From: Coleman Watts Date: Thu, 30 Apr 2015 01:42:15 +0000 (-0600) Subject: CRM-16354 - Use standard crm-form css class for wysiwyg X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=66659cd7c1c1a2dcc5a524a6986e039d14333f60;p=civicrm-core.git CRM-16354 - Use standard crm-form css class for wysiwyg --- 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() {