From 8e57d52af730f84d8d3c615702b3ee18fd65bc4d Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 14 Feb 2023 19:15:08 +0800 Subject: [PATCH] feat: submit button loading spinner --- web/app/models/UOJForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/app/models/UOJForm.php b/web/app/models/UOJForm.php index 77ec13a..98043d1 100644 --- a/web/app/models/UOJForm.php +++ b/web/app/models/UOJForm.php @@ -685,7 +685,11 @@ class UOJForm { } else { echo <<form_name}").addClass('disabled'); + $("#button-submit-{$this->form_name}") + .addClass('disabled') + .css('width', $("#button-submit-{$this->form_name}").outerWidth()) + .html(''); + $(this).submit(function () { return false; });