Accessibility #9: Regression - js error due to alertDismissal setting fixed.
authorAlok Patel <alok@agileware.com.au>
Tue, 5 Jun 2018 11:04:07 +0000 (16:34 +0530)
committerAlok Patel <alok@agileware.com.au>
Tue, 5 Jun 2018 11:04:07 +0000 (16:34 +0530)
CRM/Core/Resources.php
templates/CRM/common/l10n.js.tpl

index d6e0a2aa614068d34d98eb99a06cc311d8563223..7be010ab6bb151c63538569e20f06813219d62ea 100644 (file)
@@ -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();
index 9bae533886bd69d5ad56cf83d11d53ffd166bd87..b2274723b373cad9a5ad2f7cdc6fa7deeb298e20 100644 (file)
@@ -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});