templates: Disable button and show spinner on submit for all forms

Tests performed:

- Submit a form and notice that button has a spinner soon after click.

- Select a from like Gitweb repository creation form and submit it. After submit
go back to previous form using back button. Notice that button has been restored
to proper state.

- Without filling valid information the form, press submit. Notice that the
button does not change to a spinner.

- Check installing an app, snapshots management, network forms, wireguard forms,
etc.

- Test on Firefox and Chromium.

- Test with LibreJS that the script is accepted as valid free software license.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa authored and Veiko Aasa committed 2020-06-29 10:08:23 +03:00
1 parent 994a7a1d4b
commit ff84d3f97e
3 files changed
+106

No files matched your search

+20
View File
@@ -522,6 +522,26 @@ a.menu_link_active {
transform: translateY(-50%) translateX(-100%)
}
/*
* Form button with loading progress.
*/
.running-status-button-before {
display: inline-block;
border: 4px solid #f3f3f3; /* Light grey */
border-top: 4px solid #3498db; /* Blue */
border-radius: 50%;
width: 16px;
height: 16px;
animation: spin 1s linear infinite;
margin-left: 10px;
margin-bottom: -4px;
margin-right: -26px;
}
input[type='submit'].running-status-button {
padding-left: 32px;
}
/*
* Button toolbar
*/