CRM-13863 - Whitelist open-inline contribution links
[civicrm-core.git] / CRM / Admin / Page / LabelFormats.php
index 5aab022c314121dbc2dd5f62facc4b944257d6cb..3fc46604a5b385ec4c86d3182d1df62d339af37b 100644 (file)
@@ -124,7 +124,9 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
    * @static
    */
   function browse($action = NULL) {
-    CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
+    if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajax_popups_enabled', NULL, TRUE)) {
+      CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
+    }
     // Get list of configured Label Formats
     $labelFormatList= CRM_Core_BAO_LabelFormat::getList();
     $nameFormatList= CRM_Core_BAO_LabelFormat::getList(false, 'name_badge');