Preserve submit-button data in popup forms

If we disable the submit button in the submit handler, the browser won't
submit its value. We need this value to determine which button was
pressed.