block consecutive task submissions until the previous click has resolved

This commit is contained in:
Junior 2026-11-22 13:54:21 -05:00
parent 54baa5c305
commit a9a4667231

View File

@ -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);
}
});
}