mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
- 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 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> [sunil: Narrow the scope to only toggle buttons excluding others cases] [sunil: Minor cosmetic and styling changes] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>