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