CRM-13377 - Manipulate the main "Send Email" button but not the "Cancel" button
authorTim Otten <totten@civicrm.org>
Thu, 12 Sep 2013 06:43:08 +0000 (23:43 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 12 Sep 2013 06:43:08 +0000 (23:43 -0700)
----------------------------------------
* CRM-13377: "Send email" produces double "Processing" button
  http://issues.civicrm.org/jira/browse/CRM-13377

templates/CRM/Contact/Form/Task/EmailCommon.js

index 769e7dc48af64346ec5abe255343a42f3c9ea686..ad27b61919096216d3e0973c55e6dd4f9a698e2f 100644 (file)
@@ -2,7 +2,8 @@ cj(function ($) {
   //do not copy & paste this - find a way to generalise it
   'use strict';
    $().crmAccordions();
-   $('.form-submit').on("click", function() {
-     $('.form-submit').attr({value: ts('Processing'), disabled: 'disabled'});
+  // 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'});
    });
 });