Bug 1042319 - [Gallery] Update gallery edit UI r=djf

Updated to get rid of function and use code inline.