From 66659cd7c1c1a2dcc5a524a6986e039d14333f60 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 29 Apr 2015 19:42:15 -0600 Subject: [PATCH] CRM-16354 - Use standard crm-form css class for wysiwyg --- CRM/Core/Form.php | 7 ++----- js/Common.js | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index e102fd8e39..4bddc368b0 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -272,11 +272,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $attributes = '', $required = FALSE, $extra = NULL ) { if ($type == 'wysiwyg') { - if ($attributes === '') { - $attributes = array(); - } - $attributes = ((array) $attributes) + array('class' => ''); - $attributes['class'] .= ' crm-wysiwyg'; + $attributes = ($attributes ? $attributes : array()) + array('class' => ''); + $attributes['class'] .= ' crm-form-wysiwyg'; $type = "textarea"; } if ($type == 'select' && is_array($extra)) { diff --git a/js/Common.js b/js/Common.js index 2781a73683..87a38e1269 100644 --- a/js/Common.js +++ b/js/Common.js @@ -834,7 +834,7 @@ CRM.strings = CRM.strings || {}; $('form[data-warn-changes] :input', e.target).each(function() { $(this).data('crm-initial-value', $(this).is(':checkbox, :radio') ? $(this).prop('checked') : $(this).val()); }); - $('textarea.crm-wysiwyg', e.target) + $('textarea.crm-form-wysiwyg', e.target) .not('.crm-wysiwyg-enabled') .addClass('crm-wysiwyg-enabled') .each(function() { -- 2.25.1