connect the cancel buttons to the same callback
show/hide both header and footer