]> git.ipfire.org Git - ipfire.org.git/commitdiff
donate: Show spinner after submitting the form
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Jan 2024 21:02:11 +0000 (21:02 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Jan 2024 21:02:11 +0000 (21:02 +0000)
This will tell people that something is happening as processing the
donation can take a short moment...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/donate/donate.html

index 2bb2c6f1f35dc1b16cf9b4d8a14b0ecdf5e3402a..414eaee52233214d8a4f9799f6f79b5247b24901 100644 (file)
 
                                                <div class="block">
                                                        <div class="control">
-                                                               <input type="submit" class="button is-primary is-outlined is-fullwidth is-medium"
-                                                               id="donate" value="{{ _("Donate Now") }}">
+                                                               <button type="submit" class="button is-primary is-fullwidth is-medium" id="donate">
+                                                                       {{ _("Donate Now") }}
+                                                               </button>
                                                        </div>
                                                </div>
 
 
                        // Disable all submit buttons after the form has been submitted
                        form.one("submit", function() {
+                               // Show that something is happening...
+                               submit.addClass("is-loading");
+
+                               // Prevent the user from submitting the form again
                                submit.prop("disabled", true);
                        });