CRM-13863 - Added setting to disable ajax popups
[civicrm-core.git] / CRM / Event / Form / ParticipantView.php
index dc38494c24edaa59d98bc34a3972845d61b119de..3f4e1e125a056a3a0df46bfe574cef8728780791 100644 (file)
@@ -208,7 +208,9 @@ class CRM_Event_Form_ParticipantView extends CRM_Core_Form {
    * @access public
    */
   public function buildQuickForm() {
-    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');
+    }
     $this->addButtons(array(
         array(
           'type' => 'cancel',