From: Coleman Watts Date: Tue, 3 Mar 2015 23:41:44 +0000 (-0500) Subject: CRM-15932 - Enable/disable form buttons appropriately X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6e7c9fdc1e8668dd0e394a7ded9455eef4f85afc;p=civicrm-core.git CRM-15932 - Enable/disable form buttons appropriately --- 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() {