diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-16 05:11:01 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-16 05:11:01 +0000 |
commit | 2d1ef531dcca714d60bd2f61927d85a9b77d4957 (patch) | |
tree | 16cac6e98db5bc1d43b7f0a667eceb7417a39b31 /themes/seven/template.php | |
parent | 9db02aba50f447ee0f29e03d359c25b008a839ff (diff) | |
download | brdo-2d1ef531dcca714d60bd2f61927d85a9b77d4957.tar.gz brdo-2d1ef531dcca714d60bd2f61927d85a9b77d4957.tar.bz2 |
#601806 by sun, effulgentsia, and Damien Tournoud: drupal_render() should not set default element properties that make no sense.
Diffstat (limited to 'themes/seven/template.php')
-rw-r--r-- | themes/seven/template.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/themes/seven/template.php b/themes/seven/template.php index 856beeb38..b3a347bae 100644 --- a/themes/seven/template.php +++ b/themes/seven/template.php @@ -77,5 +77,18 @@ function seven_tablesort_indicator($variables) { */ function seven_fieldset($variables) { $element = $variables['element']; - return '<fieldset' . drupal_attributes($element['#attributes']) . '>' . ($element['#title'] ? '<legend><span>' . $element['#title'] . '</span></legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="fieldset-description">' . $element['#description'] . '</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . (isset($element['#value']) ? $element['#value'] : '') . "</fieldset>\n"; + + $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; } |