diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-05-05 09:07:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-05-05 09:07:08 +0000 |
commit | 77f6f233f8868d0706249621dcd931878c5de6b3 (patch) | |
tree | bcd09f80c615e6bdcae1412f9a9a54f91b1c1b90 /includes | |
parent | 6658273b36ffc64a6c2ba66bf08cda9f3923252d (diff) | |
download | brdo-77f6f233f8868d0706249621dcd931878c5de6b3.tar.gz brdo-77f6f233f8868d0706249621dcd931878c5de6b3.tar.bz2 |
- Modified patch #21980 by willmoy: made form_group() accept HTML attributes.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index 2531fc992..f279fe384 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1051,11 +1051,13 @@ function form_item($title, $value, $description = NULL, $id = NULL, $required = * The form items within the group, as an HTML string. * @param $description * Explanatory text to display after the form item group. + * @param $attributes + * An associative array of HTML attributes to add to the fieldset tag. * @return * A themed HTML string representing the form item group. */ -function form_group($legend, $group, $description = NULL) { - return '<fieldset>' . ($legend ? '<legend>'. $legend .'</legend>' : '') . $group . ($description ? '<div class="description">'. $description .'</div>' : '') . "</fieldset>\n"; +function form_group($legend, $group, $description = NULL, $attributes = NULL) { + return '<fieldset' . drupal_attributes($attributes) .'>' . ($legend ? '<legend>'. $legend .'</legend>' : '') . $group . ($description ? '<div class="description">'. $description .'</div>' : '') . "</fieldset>\n"; } /** |