[#51447141] DRY up file upload dialog templates and CSS.