From a9a46672312ddd211850b9e4f4ee7bfd3dc81f02 Mon Sep 17 00:00:00 2001 From: Junior Date: Sun, 22 Nov 2026 13:54:21 -0500 Subject: [PATCH] block consecutive task submissions until the previous click has resolved --- js/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/main.js b/js/main.js index 406fdc0..2708c24 100644 --- a/js/main.js +++ b/js/main.js @@ -152,6 +152,7 @@ function toggleShowAll() { } function submitTask() { + $("#form_submit").prop("disabled", true); $.ajax({ url: 'ajax/task-submit.php', type: 'POST', @@ -175,6 +176,9 @@ function submitTask() { }, error: function(jqo, stat, error) { toastr.error("Could not communicate with server!", "Server Error"); + }, + complete function() { + $("#form_submit").prop("disabled", false); } }); }