Skip to content

Commit a08a838

Browse files
committed
Patch: re-enable submit buttons with ajax_form_submit class after 3 sec
1 parent d275702 commit a08a838

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/Views/shared/common.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function ajax_form_submit(_this)
3737
{
3838
// Disable submit button until AJAX response has come
3939
_this.prop('disabled', true);
40+
setTimeout(function(){ _this.prop("disabled", false);}, 3000);
4041
4142
var form = _this.closest('form');
4243
var formData = new FormData(form[0]);
@@ -85,9 +86,6 @@ function ajax_form_submit(_this)
8586
return false;
8687
}
8788
}
88-
89-
// Enable submit button
90-
_this.prop('disabled', false);
9189
}
9290
});
9391
}

0 commit comments

Comments
 (0)