Skip to content
Snippets Groups Projects
Verified Commit 9eba9a80 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera
Browse files

Add whitelist not to button query

- prevent button with defined class to be disabled
parent eac596f7
No related branches found
No related tags found
1 merge request!22992Prevent auto disable of submit buttons with class
......@@ -222,7 +222,7 @@ document.addEventListener('DOMContentLoaded', () => {
// Disable form buttons while a form is submitting
$body.on('ajax:complete, ajax:beforeSend, submit', 'form', function ajaxCompleteCallback(e) {
const $buttons = $('[type="submit"], .js-disable-on-submit', this);
const $buttons = $('[type="submit"], .js-disable-on-submit', this).not('.js-no-auto-disable');
switch (e.type) {
case 'ajax:beforeSend':
case 'submit':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment