From 6e7c9fdc1e8668dd0e394a7ded9455eef4f85afc Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 3 Mar 2015 18:41:44 -0500 Subject: [PATCH] CRM-15932 - Enable/disable form buttons appropriately --- templates/CRM/Core/Form/RecurringEntity.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/CRM/Core/Form/RecurringEntity.tpl b/templates/CRM/Core/Form/RecurringEntity.tpl index 2e334ba174..c25626516a 100644 --- a/templates/CRM/Core/Form/RecurringEntity.tpl +++ b/templates/CRM/Core/Form/RecurringEntity.tpl @@ -200,6 +200,11 @@ } }); + // Enable/disable form buttons when not embedded in another form + $form.on('change', function() { + $('#_qf_Repeat_submit-top, #_qf_Repeat_submit-bottom').prop('disabled', !CRM.utils.initialValueChanged('#recurring-entity-block')); + }); + // Pluralize frequency options var recurringFrequencyOptions = {/literal}{$recurringFrequencyOptions|@json_encode}{literal}; function pluralizeUnits() { -- 2.25.1