From: Coleman Watts Date: Thu, 11 Sep 2014 23:41:19 +0000 (-0400) Subject: CRM-15242 - Fix scheduleReminder 'limit to' option X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dd6e66623aab9296310be926f907f1eae68ed2cb;p=civicrm-core.git CRM-15242 - Fix scheduleReminder 'limit to' option --- 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}