feat: submit button loading spinner
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-14 19:15:08 +08:00
parent 1aa61ba767
commit 8e57d52af7
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -685,7 +685,11 @@ class UOJForm {
} else {
echo <<<EOD
if (ok) {
$("#button-submit-{$this->form_name}").addClass('disabled');
$("#button-submit-{$this->form_name}")
.addClass('disabled')
.css('width', $("#button-submit-{$this->form_name}").outerWidth())
.html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>');
$(this).submit(function () {
return false;
});