Refactor the javascript edit functions for DamsObject create form. DHH-203