seven_fieldset

Versions
7
seven_fieldset($variables)

Override of theme_fieldset().

Add span to legend tag, so we can style it to be inside the fieldset.

Code

themes/seven/template.php, line 77

<?php
function seven_fieldset($variables) {
  $element = $variables['element'];

  $output = '<fieldset' . drupal_attributes($element['#attributes']) . '>';
  if (!empty($element['#title'])) {
    $output .= '<legend><span>' . $element['#title'] . '</span></legend>';
  }
  if (!empty($element['#description'])) {
    $output .= '<div class="fieldset-description">' . $element['#description'] . '</div>';
  }
  $output .= $element['#children'];
  if (isset($element['#value'])) {
    $output .= $element['#value'];
  }
  $output .= "</fieldset>\n";
  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.