CRM-16354 - Remove cms wysiwyg from core
[civicrm-core.git] / CRM / Admin / Form / Preferences / Display.php
index 6fb5569b47cd1a3678176228b86b5e728cc624f2..f0054720639d13a04b4cf846d4f64844b42f3a45 100644 (file)
@@ -131,11 +131,6 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
       $defaults['sort_name_format'] = $this->_config->sort_name_format;
     }
 
-    $config = CRM_Core_Config::singleton();
-    if ($config->userSystem->is_drupal == '1' && module_exists("wysiwyg")) {
-      $defaults['wysiwyg_input_format'] = variable_get('civicrm_wysiwyg_input_format', 0);
-    }
-
     return $defaults;
   }
 
@@ -154,37 +149,8 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
     $config = CRM_Core_Config::singleton();
     $extra = array();
 
-    //if not using Joomla, remove Joomla default editor option
-    if ($config->userFramework != 'Joomla') {
-      unset($wysiwyg_options[3]);
-    }
-
-    $drupal_wysiwyg = FALSE;
-    if (!$config->userSystem->is_drupal || !module_exists("wysiwyg")) {
-      unset($wysiwyg_options[4]);
-    }
-    else {
-      $extra['onchange'] = '
-      if (this.value==4) {
-        cj("#crm-preferences-display-form-block-wysiwyg_input_format").show();
-      }
-      else {
-        cj("#crm-preferences-display-form-block-wysiwyg_input_format").hide()
-      }';
-
-      $formats = filter_formats();
-      $format_options = array();
-      foreach ($formats as $id => $format) {
-        $format_options[$id] = $format->name;
-      }
-      $drupal_wysiwyg = TRUE;
-    }
     $this->addElement('select', 'editor_id', ts('WYSIWYG Editor'), $wysiwyg_options, $extra);
 
-    if ($drupal_wysiwyg) {
-      $this->addElement('select', 'wysiwyg_input_format', ts('Input Format'), $format_options, NULL);
-    }
-
     $editOptions = CRM_Core_OptionGroup::values('contact_edit_options', FALSE, FALSE, FALSE, 'AND v.filter = 0');
     $this->assign('editOptions', $editOptions);