js: Don't disable inputs upon auto-submits at all
This commit is contained in:
parent
7cea0d78e4
commit
4641d8e820
|
@ -119,8 +119,10 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// otherwise the form is submitted several times by clicking the "Submit" button several times
|
if (typeof $autoSubmittedBy === 'undefined') {
|
||||||
$form.find('input[type=submit],button[type=submit],button:not([type])').prop('disabled', true);
|
// otherwise the form is submitted several times by clicking the "Submit" button several times
|
||||||
|
$form.find('input[type=submit],button[type=submit],button:not([type])').prop('disabled', true);
|
||||||
|
}
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -129,7 +129,10 @@
|
||||||
|
|
||||||
// Disable all form controls to prevent resubmission except for our search input
|
// Disable all form controls to prevent resubmission except for our search input
|
||||||
// Note that disabled form inputs will not be enabled via JavaScript again
|
// Note that disabled form inputs will not be enabled via JavaScript again
|
||||||
if (! $form.is('[role="search"]') && $target.attr('id') === $form.closest('.container').attr('id')) {
|
if (! $autoSubmittedBy
|
||||||
|
&& ! $form.is('[role="search"]')
|
||||||
|
&& $target.attr('id') === $form.closest('.container').attr('id')
|
||||||
|
) {
|
||||||
$form.find('input[type=submit],button[type=submit],button:not([type])').prop('disabled', true);
|
$form.find('input[type=submit],button[type=submit],button:not([type])').prop('disabled', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue