CRM-16646 - Protection against multiple submits on contributions page
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 10 Jun 2015 11:37:21 +0000 (17:07 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 10 Jun 2015 11:37:21 +0000 (17:07 +0530)
js/Common.js

index 544f82178a6fc07ce65c31761b920797786d598a..8b574ae37819c2204ea72371be53247bb0254c43 100644 (file)
@@ -158,11 +158,11 @@ var submitcount = 0;
 function submitOnce(obj, formId, procText) {
   // if named button clicked, change text
   if (obj.value != null) {
-    obj.value = procText + " ...";
+    cj('input[name=' + obj.name + ']').val(procText + " ...");
   }
   cj(obj).closest('form').attr('data-warn-changes', 'false');
   if (document.getElementById) { // disable submit button for newer browsers
-    obj.disabled = true;
+    cj('input[name=' + obj.name + ']').attr("disabled", true);
     document.getElementById(formId).submit();
     return true;
   }