js: Only disable submit buttons on form submit
Previously all `input` elements (text, date, number, ...) got also disabled. This is unecessary.
This commit is contained in:
parent
d3f4ffe35c
commit
7cea0d78e4
|
@ -120,7 +120,7 @@
|
|||
});
|
||||
|
||||
// otherwise the form is submitted several times by clicking the "Submit" button several times
|
||||
$form.find('input:not(:disabled)').prop('disabled', true);
|
||||
$form.find('input[type=submit],button[type=submit],button:not([type])').prop('disabled', true);
|
||||
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
// Disable all form controls to prevent resubmission except for our search input
|
||||
// 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')) {
|
||||
$form.find('input:not(:disabled)').prop('disabled', true);
|
||||
$form.find('input[type=submit],button[type=submit],button:not([type])').prop('disabled', true);
|
||||
}
|
||||
|
||||
// Show a spinner depending on how the form is being submitted
|
||||
|
|
Loading…
Reference in New Issue