From: Paul Campbell Date: Tue, 30 Sep 2014 11:27:20 +0000 (+0100) Subject: CRM-15389 - js error in communication prefs X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f6264114319a6769220410746c4d7757ccd85ea;p=civicrm-core.git CRM-15389 - js error in communication prefs ---------------------------------------- * CRM-15389: Cannot change contact greetings due to Javascript error https://issues.civicrm.org/jira/browse/CRM-15389 --- diff --git a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl index 8400c2cb4c..63cc740b65 100644 --- a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl @@ -149,18 +149,19 @@ CRM.$(function($) { }); function showGreeting( element ) { - $("#" + element ).show( ); - $("#" + element + '_display' ).hide( ); + cj("#" + element ).show( ); + cj("#" + element + '_display' ).hide( ); // TO DO fix for custom greeting var fldName = '#' + element + '_id'; - if ( $( fldName ).val( ) == 4 ) { - $("#greetings1").show( ); - $("#greetings2").show( ); - $( fldName + "_html").show( ); - $( fldName + "_label").show( ); + if ( cj( fldName ).val( ) == 4 ) { + cj("#greetings1").show( ); + cj("#greetings2").show( ); + cj( fldName + "_html").show( ); + cj( fldName + "_label").show( ); } } + {/literal}