Skip to content
Snippets Groups Projects
Commit d080148e authored by deepak-srivastava's avatar deepak-srivastava
Browse files

Merge pull request #1700 from pratik-joshi/CRM-13449

CRM-13449 : while onclick on submit button - putting execution of disbled = true inside timeout function to process the submit of form and then disbling submit button
parents e46fba18 72628761
Branches
Tags
No related merge requests found
......@@ -4,6 +4,12 @@ cj(function ($) {
$().crmAccordions();
// NOTE: Might be safer to say $('[name=_qf_Email_upload]')
$('.form-submit').not('.cancel').on("click", function() {
$('.form-submit').not('.cancel').attr({value: ts('Processing'), disabled: 'disabled'});
$('.form-submit').not('.cancel').attr({value: ts('Processing')});
// CRM-13449 : setting a 0 ms timeout is needed
// for some browsers like chrome. Used for purpose of
// submit the form and stop accidental multiple clicks
setTimeout(function(){
$('.form-submit').not('.cancel').attr({disabled: 'disabled'});
}, 0);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment