Add and use record category templates on edit

Untested.