add dismiss button on editPin modal

also modify the viewPin modal data dismiss button to work properly