Extracting common html part for create and edit