? .DS_Store ? f.patch ? format.patch ? includes/.DS_Store ? modules/.DS_Store ? modules/filter/.DS_Store ? sites/formapi Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.181 diff -u -p -r1.181 form.inc --- includes/form.inc 7 Mar 2007 17:31:40 -0000 1.181 +++ includes/form.inc 13 Mar 2007 04:49:43 -0000 @@ -1119,7 +1119,28 @@ function theme_password_confirm($element return theme('form_element', $element, $element['#children']); } -/* +/** + * Find siblings of a given type of an element. + * + * @param $element + * The element to start from. + * @param $type + * The type of siblings we are interested in. + * @return + * An array of form elements which are siblings of $element + * and their type is $type. + */ +function form_find_siblings($element, $type = 'fieldset') { + $siblings = array(); + foreach (element_children($element['#parent']) as $key) { + if ($element['#parent'][$key]['#type'] == $type) { + $siblings[] = $element['#parent'][$key]; + } + } + return $siblings; +} + +/** * Expand a password_confirm field into two text boxes. */ function expand_password_confirm($element) { Index: modules/filter/filter.module =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v retrieving revision 1.166 diff -u -p -r1.166 filter.module --- modules/filter/filter.module 12 Mar 2007 11:31:02 -0000 1.166 +++ modules/filter/filter.module 13 Mar 2007 04:49:44 -0000 @@ -793,6 +793,7 @@ function filter_form($value = FILTER_FOR '#collapsed' => TRUE, '#weight' => $weight, '#validate' => array('filter_form_validate' => array()), + '#after_build' => array('filter_form_after_build'), ); // Multiple formats available: display radio buttons with tips. foreach ($formats as $format) {