From 132ab8048518595b0bde4946af27175011783bee Mon Sep 17 00:00:00 2001 From: Samuel Vanhove Date: Wed, 29 Apr 2015 17:52:02 -0400 Subject: [PATCH] Wysiwyg API change + typos --- CRM/Core/CodeGen/Specification.php | 2 +- CRM/Core/I18n/Form.php | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CRM/Core/CodeGen/Specification.php b/CRM/Core/CodeGen/Specification.php index 32e2cc586e..6e707c1ede 100644 --- a/CRM/Core/CodeGen/Specification.php +++ b/CRM/Core/CodeGen/Specification.php @@ -410,7 +410,7 @@ class CRM_Core_CodeGen_Specification { 'labelColumn', // Non-translated machine name for programmatic lookup. Defaults to 'name' if that column exists 'nameColumn', - // Where clause snippet (will be joined to the rest of the query with AND operator) + // Where clause snippet (will be joined to the rest of the query with AND operator) 'condition', // callback funtion incase of static arrays 'callback', diff --git a/CRM/Core/I18n/Form.php b/CRM/Core/I18n/Form.php index 8ea060b2f7..a02e0f3469 100644 --- a/CRM/Core/I18n/Form.php +++ b/CRM/Core/I18n/Form.php @@ -66,16 +66,15 @@ class CRM_Core_I18n_Form extends CRM_Core_Form { $widget = $widgets[$table][$field]; // attributes - $attributes = array('css' => ''); + $attributes = array('class' => ''); if (isset($widget['rows'])) { $attributes['rows'] = $widget['rows']; } if (isset($widget['cols'])) { $attributes['cols'] = $widget['cols']; } - // FIXME: should have this $required = !empty($widget['required']); - + $languages = CRM_Core_I18n::languages(TRUE); foreach ($this->_locales as $locale) { $name = "{$field}_{$locale}"; @@ -83,8 +82,8 @@ class CRM_Core_I18n_Form extends CRM_Core_Form { $attributes['class'] .= ' default-lang'; } if ($widget['type'] == 'RichTextEditor') { - $attributes['click_wysiwyg'] = TRUE; - $this->addWysiwyg($name, $languages[$locale], $attributes, $required); + $attributes['class'] = ' collapsed'; + $this->add('wysiwyg', $name, $languages[$locale], $attributes, $required); } else { $this->add($widget['type'], $name, $languages[$locale], $attributes, $required); -- 2.25.1