Skip to content

Commit

Permalink
use json encode for assigning smarty vars to js
Browse files Browse the repository at this point in the history
  • Loading branch information
Jitendra Purohit authored and sluc23 committed Jan 10, 2018
1 parent 55e8c4d commit e2561e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/CRM/Activity/Form/Activity.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
{literal}
<script type="text/javascript">
CRM.$(function($) {
var doNotNotifyAssigneeFor = ["{/literal}{'","'|implode:$doNotNotifyAssigneeFor}{literal}"];
var doNotNotifyAssigneeFor = {/literal}{$doNotNotifyAssigneeFor|@json_encode}{literal};
$('#activity_type_id').change(function() {
if ($.inArray($(this).val(), doNotNotifyAssigneeFor) != -1) {
$('#notify_assignee_msg').hide();
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Case/Form/Activity.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
{literal}
<script type="text/javascript">
CRM.$(function($) {
var doNotNotifyAssigneeFor = ["{/literal}{'","'|implode:$doNotNotifyAssigneeFor}{literal}"];
var doNotNotifyAssigneeFor = {/literal}{$doNotNotifyAssigneeFor|@json_encode}{literal};
$('#activity_type_id').change(function() {
if ($.inArray($(this).val(), doNotNotifyAssigneeFor) != -1) {
$('#notify_assignee_msg').hide();
Expand Down

0 comments on commit e2561e1

Please sign in to comment.