Refactor edit/new form into a partial