From a9fb61230cbc4ef607490d5b774437f322298f80 Mon Sep 17 00:00:00 2001 From: Alok Patel Date: Tue, 5 Jun 2018 16:34:07 +0530 Subject: [PATCH] Accessibility #9: Regression - js error due to alertDismissal setting fixed. --- CRM/Core/Resources.php | 2 +- templates/CRM/common/l10n.js.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index d6e0a2aa61..7be010ab6b 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -690,7 +690,7 @@ class CRM_Core_Resources { 'filters' => self::getEntityRefFilters(), ), 'ajaxPopupsEnabled' => self::singleton()->ajaxPopupsEnabled, - 'allowAlertAutodismissal' => Civi::settings()->get('allow_alert_autodismissal'), + 'allowAlertAutodismissal' => (bool) Civi::settings()->get('allow_alert_autodismissal'), ); print CRM_Core_Smarty::singleton()->fetchWith('CRM/common/l10n.js.tpl', $vars); CRM_Utils_System::civiExit(); diff --git a/templates/CRM/common/l10n.js.tpl b/templates/CRM/common/l10n.js.tpl index 9bae533886..b2274723b3 100644 --- a/templates/CRM/common/l10n.js.tpl +++ b/templates/CRM/common/l10n.js.tpl @@ -33,7 +33,7 @@ $.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = {$config->dateInputFormat|@json_encode}; CRM.config.timeIs24Hr = {if $config->timeInputFormat eq 2}true{else}false{/if}; CRM.config.ajaxPopupsEnabled = {$ajaxPopupsEnabled|@json_encode}; - CRM.config.allowAlertAutodismissal = {$allowAlertAutodismissal}; + CRM.config.allowAlertAutodismissal = {$allowAlertAutodismissal|@json_encode}; // Merge entityRef settings CRM.config.entityRef = $.extend({ldelim}{rdelim}, {$entityRef|@json_encode}, CRM.config.entityRef || {ldelim}{rdelim}); -- 2.25.1