From: Coleman Watts Date: Sun, 8 Mar 2015 02:39:11 +0000 (-0500) Subject: CRM-15932 - Fix recurringEntity form validation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=485f505c2d6794600c2039a489a65eafad4dd200;p=civicrm-core.git CRM-15932 - Fix recurringEntity form validation --- diff --git a/templates/CRM/Core/Form/RecurringEntity.tpl b/templates/CRM/Core/Form/RecurringEntity.tpl index c25626516a..d85e499f9e 100644 --- a/templates/CRM/Core/Form/RecurringEntity.tpl +++ b/templates/CRM/Core/Form/RecurringEntity.tpl @@ -110,7 +110,7 @@ $('#repetition_frequency_unit', $form).each(changeFrequencyUnit).change(changeFrequencyUnit); function disableUnselected() { - $('input:radio[name=ends], input[name=repeats_by]', $form).not(':checked').siblings(':input').prop('disabled', true); + $('input:radio[name=ends], input[name=repeats_by]', $form).not(':checked').siblings(':input').prop('disabled', true).removeClass('required'); } disableUnselected(); @@ -119,6 +119,10 @@ disableUnselected(); }); + $('input:radio[name=ends]').siblings('.crm-clear-link').click(function() { + $('input:radio[name=ends][value=1]').prop('checked', true).trigger('click'); + }); + function validate() { var valid = $(':input', '#recurring-entity-block').valid(), modified = CRM.utils.initialValueChanged('#recurring-entity-block');