From 488282a0bffeca335dff32878c222c594ba4c2c9 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Thu, 7 Dec 2017 11:32:23 +0530 Subject: [PATCH] additional js cleanup done by coleman --- templates/CRM/Admin/Form/Preferences/Display.tpl | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/templates/CRM/Admin/Form/Preferences/Display.tpl b/templates/CRM/Admin/Form/Preferences/Display.tpl index 7efd5cfcf1..04c7263d4e 100644 --- a/templates/CRM/Admin/Form/Preferences/Display.tpl +++ b/templates/CRM/Admin/Form/Preferences/Display.tpl @@ -237,15 +237,10 @@ $('#contact_edit_preferences').val(params.toString()); } - //show/hide activity types based on checkbox value - if ($('#activity_assignee_notification').is(":checked")) { - $('.crm-preferences-display-form-activity_types').show(); - } - else { - $('.crm-preferences-display-form-activity_types').hide(); - } + // show/hide activity types based on checkbox value + $('.crm-preferences-display-form-activity_types').toggle($('#activity_assignee_notification').is(":checked")); $('#activity_assignee_notification').click(function() { - $('.crm-preferences-display-form-activity_types').toggle($('#activity_assignee_notification').is(":checked")); + $('.crm-preferences-display-form-activity_types').toggle($(this).is(":checked")); }); var invoicesKey = '{/literal}{$invoicesKey}{literal}'; -- 2.25.1