ui: Submit buttons are disabled when navigating back to a page
!1962 (closed) introduced a change to disable all submit buttons on a page when a form is submitted. After a form is submitted and this results in navigation to a new page, pressing the back button results in an unusable page because all the buttons are disabled. This is not a problem when the navigation of the form submission is onto the same page.
An example of this is the snapshots management page. Select a snapshot and choose delete snapshot. Without answering on the confirmation page, use the browser's back button to navigate back. See that the "Create snapshot button is disabled".
There are a couple of ways to handle this:
- Use the 'pageshow' event to re-enable the submit buttons. Care must be taken not to enable buttons that were originally disabled. If this can be done reliably this approach should be preferred.
- Restrict the code to samba where it was needed.