From dd6e66623aab9296310be926f907f1eae68ed2cb Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 11 Sep 2014 19:41:19 -0400 Subject: [PATCH] CRM-15242 - Fix scheduleReminder 'limit to' option --- templates/CRM/Admin/Form/ScheduleReminders.tpl | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index f5a89b4360..3434c00866 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -168,7 +168,7 @@ $('#relativeDate, #relativeDateRepeat, #repeatFields', $form).hide(); } - $('#entity_0', $form).change(buildSelects); + $('#entity_0', $form).change(buildSelects).change(showHideLimitTo); loadMsgBox(); $('#mode', $form).change(loadMsgBox); @@ -211,6 +211,10 @@ $('#is_recipient_listing', $form).val(''); } } + // CRM-14070 Hide limit-to when entity is activity + function showHideLimitTo() { + $('#limit_to', $form).toggle(!($('#entity_0', $form).val() == '1')); + } }); function loadMsgBox() { @@ -231,15 +235,6 @@ } } - function showHideLimitTo() { - if (cj('#entity_0').val() == 1) { - cj('#limit_to').hide(); - } - else { - cj('#limit_to').show(); - } - } - {/literal} -- 2.25.1