$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)) {
$('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() {