From 76a8cd55b80a8c0af387f36c42e2f8ff2ad4b56b Mon Sep 17 00:00:00 2001 From: monishdeb Date: Tue, 18 Nov 2014 01:18:58 +0530 Subject: [PATCH] QA fix --- .../CRM/Admin/Form/ScheduleReminders.tpl | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index 3b565d06d4..9365a9ab2c 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -181,7 +181,7 @@ $('#relativeDate, #relativeDateRepeat, #repeatFields, #OR', $form).hide(); } - $('#entity_0', $form).change(buildSelects).change(showHideLimitTo); + $('#entity_0', $form).change(buildSelects); loadMsgBox(); $('#mode', $form).change(loadMsgBox); @@ -221,31 +221,31 @@ CRM.utils.setOptions($('#recipient_listing', $form), result.values); }); $("#recipientList", $form).show(); - } else { - $("#recipientList", $form).hide(); - if ($('#entity_0', $form).val() !== '1' && $('#limit_to').val() == '') { - $('tr.recipient:visible, a.limit_to, a.recipient').hide(); - } } - if ($('#limit_to').val() != '') { - $('a.limit_to, a.recipient').show(); - $('#recipient').css("margin-left", "12px"); + + var entity = $('#entity_0', $form).val(); + if (!(entity === '2' || entity === '3')) { + $('#recipientList', $form).hide(); } + showHideLimitTo(); } // CRM-14070 Hide limit-to when entity is activity function showHideLimitTo() { $('#limit_to', $form).toggle(!($('#entity_0', $form).val() == '1')); if ($('#entity_0', $form).val() != '1') { if ($('#limit_to', $form).val() == '') { - $('#recipient, a.limit_to, a.recipient').hide(); + $('tr.recipient:visible, #recipientList, #recipient, a.recipient').hide(); + $('a.limit_to').show(); } else { $('a.limit_to, a.recipient').show(); + $('#recipient').css("margin-left", "12px"); } $("label[for='recipient']").text('{/literal}{$recipientLabels.other}{literal}'); } else { - $('#recipient').show().css("margin-left", "-2px"); + $('#recipient, a.recipient').show() +$('#recipient').css("margin-left", "-2px"); $('a.limit_to').hide(); $("label[for='recipient']").text('{/literal}{$recipientLabels.activity}{literal}'); } -- 2.25.1