Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.368 diff -u -p -r1.368 form.inc --- includes/form.inc 29 Aug 2009 16:30:14 -0000 1.368 +++ includes/form.inc 1 Sep 2009 22:04:22 -0000 @@ -1637,7 +1637,20 @@ function theme_fieldset($element) { } $element['#attributes']['id'] = $element['#id']; - return '' . ($element['#title'] ? '' . $element['#title'] . '' : '') . (isset($element['#description']) && $element['#description'] ? '
' . $element['#description'] . '
' : '') . (!empty($element['#children']) ? $element['#children'] : '') . (isset($element['#value']) ? $element['#value'] : '') . "\n"; + $legend_class = ''; + + if (!empty($element['#show_legend'])) { + $legend_class = ' class="element-invisible"'; + } + + $output = ''; + $output .= ($element['#title'] ? '' . $element['#title'] . '' : ''); + $output .= (isset($element['#description']) && $element['#description'] ? '
' . $element['#description'] . '
' : ''); + $output .= (!empty($element['#children']) ? $element['#children'] : ''); + $output .= (isset($element['#value']) ? $element['#value'] : ''); + $output .= "\n"; + + return $output; } /** Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.784 diff -u -p -r1.784 system.module --- modules/system/system.module 1 Sep 2009 16:50:12 -0000 1.784 +++ modules/system/system.module 1 Sep 2009 22:04:22 -0000 @@ -371,8 +371,9 @@ function system_elements() { $type['radios'] = array( '#input' => TRUE, '#process' => array('form_process_radios'), - '#theme_wrappers' => array('radios'), + '#theme_wrappers' => array('radios', 'fieldset'), '#pre_render' => array('form_pre_render_conditional_form_element'), + '#show_legend' => TRUE, ); $type['radio'] = array( @@ -388,8 +389,9 @@ function system_elements() { '#input' => TRUE, '#tree' => TRUE, '#process' => array('form_process_checkboxes'), - '#theme_wrappers' => array('checkboxes'), + '#theme_wrappers' => array('checkboxes', 'fieldset'), '#pre_render' => array('form_pre_render_conditional_form_element'), + '#show_legend' => TRUE, ); $type['checkbox'] = array( @@ -422,7 +424,8 @@ function system_elements() { '#element_validate' => array('date_validate'), '#process' => array('form_process_date'), '#theme' => 'date', - '#theme_wrappers' => array('form_element'), + '#theme_wrappers' => array('fieldset'), + '#show_legend' => TRUE, ); $type['file'] = array(