From b439474a0af9ca39a2396cbb195af1678934bc6e Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 15 Jan 2014 15:53:08 +0530 Subject: [PATCH] CRM-14070, fixes - Suppress 'limit_to' drop down when Entity is 'Activity' http://issues.civicrm.org/jira/browse/CRM-14070 --- .../CRM/Admin/Form/ScheduleReminders.tpl | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index bd08ce4fe2..4f066f0ae5 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -221,6 +221,11 @@ cj('#mode').change(function () { loadMsgBox(); }); + + showHideLimitTo(); + cj('#entity_0').change(function () { + showHideLimitTo(); + }); }); function loadMsgBox() { @@ -241,16 +246,26 @@ } } - cj(function() { - if ( cj('#is_recipient_listing').val( ) ) { - cj('#recipientList').show(); - } else { - cj('#recipientList').hide(); - } - cj('#recipient').change( function( ) { - populateRecipient(); - }); - }); + function showHideLimitTo() { + if (cj('#entity_0').val() == 1) { + cj('#limit_to').hide(); + } + else { + cj('#limit_to').show(); + } + } + + cj(function () { + if (cj('#is_recipient_listing').val()) { + cj('#recipientList').show(); + } + else { + cj('#recipientList').hide(); + } + cj('#recipient').change(function () { + populateRecipient(); + }); + }); function populateRecipient( ) { var recipient = cj("#recipient option:selected").val(); -- 2.25.1