comment textarea resizable function removed when removed fieldset
sadist - November 1, 2009 - 17:48
| Project: | Better Formats |
| Version: | 6.x-1.1 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I need to remove/hide the Input Format fieldset below the comment textarea. When I disable it at Permission's settings (show format selection for comments), the comment textarea is no longer resizable.
I'd tried overriding the theme function, but with no avail.
function THEMENAME_better_formats_textarea($element) {
$class = array('form-textarea');
// Add teaser behavior (must come before resizable)
if (!empty($element['#teaser'])) {
drupal_add_js('misc/teaser.js');
// Note: arrays are merged in drupal_get_js().
drupal_add_js(array('teaserCheckbox' => array($element['#id'] => $element['#teaser_checkbox'])), 'setting');
drupal_add_js(array('teaser' => array($element['#id'] => $element['#teaser'])), 'setting');
$class[] = 'teaser';
}
// Add resizable behavior
if ($element['#resizable'] !== FALSE) {
drupal_add_js('misc/textarea.js');
$class[] = 'resizable';
}
_form_set_class($element, $class);
return theme('form_element', $element, '<textarea cols="'. $element['#cols'] .'" rows="'. $element['#rows'] .'" name="'. $element['#name'] .'" id="'. $element['#id'] .'" '. drupal_attributes($element['#attributes']) .'>'. check_plain($element['#value']) .'</textarea>');
}
#1
Sorry, this will only happen if there's no fieldset below the comment textarea box. But without better_formats.module, there won't be this problem. It's kinda weird.
Anyone encounter this before?
#2
Confirmed.
That theme function doesn't work because there is no such function.
I will look into this and fix it as soon as I can.