1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-03 17:34:59 +02:00

Truly disable a button on FormSubmit

We need to add attribute disabled to the button to truly disable it, otherwise the click event is fired up again and again causing form submissions
This commit is contained in:
Serios 2018-04-20 09:45:03 +03:00 committed by GitHub
parent 3e1feac04d
commit bcce574e79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,6 +373,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
if($button.attr('data-disable') == 'true')
{
$button.addClass('disabled');
$button.prop("disabled", true);
}
});