combined add and edit in to one view