CRM-15932 - Enable/disable form buttons appropriately
authorColeman Watts <coleman@civicrm.org>
Tue, 3 Mar 2015 23:41:44 +0000 (18:41 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 3 Mar 2015 23:41:44 +0000 (18:41 -0500)
templates/CRM/Core/Form/RecurringEntity.tpl

index 2e334ba174a64313bc17c7fae9cb878c1cb28dff..c25626516ababb7c8158c3f921199770adcee19b 100644 (file)
       }\r
     });\r
 \r
+    // Enable/disable form buttons when not embedded in another form\r
+    $form.on('change', function() {\r
+      $('#_qf_Repeat_submit-top, #_qf_Repeat_submit-bottom').prop('disabled', !CRM.utils.initialValueChanged('#recurring-entity-block'));\r
+    });\r
+\r
     // Pluralize frequency options\r
     var recurringFrequencyOptions = {/literal}{$recurringFrequencyOptions|@json_encode}{literal};\r
     function pluralizeUnits() {\r