templates: Make toggle button responsive

  • Immediately after submitting a form with a toggle button, toggle and disable the button and show a spinner on the button.
  • Disable all other form button elements on the page when a form is submitted to allow only one form submission at a time.

Closes #1993 (closed)

Tests performed:

  • Check that when enabling and disabling an app, the toggle button is responsive
  • On the Samba app page, check that when enabling a share, the toggle button is responsive and all other toggle buttons on the page are disabled.
  • On the Samba app page, check that clicking the diagnostics button still works while a share is being enabled or disabled.
  • On the SSH confugration app page, check that after clicking the Update setup button, a spinner is shown and the app enable/disable toggle button is disabled.
  • Test on Firefox and Chromium.

Signed-off-by: Veiko Aasa veiko17@disroot.org

Merge request reports

Loading