Improve auto-disable logic for some form buttons
This commit is contained in:
parent
455f991857
commit
a8c8447297
|
@ -182,6 +182,9 @@ $(function() {
|
|||
// https://stackoverflow.com/questions/5691054/disable-submit-button-on-form-submit
|
||||
$('form.autodisable').submit(function() {
|
||||
var submit = $(this).find('input[type="submit"]');
|
||||
if (! submit.length) {
|
||||
submit = $(this).find('button[type="submit"]');
|
||||
}
|
||||
if (submit.length) {
|
||||
disable_button(submit);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue