summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-05-05 09:07:08 +0000
committerDries Buytaert <dries@buytaert.net>2005-05-05 09:07:08 +0000
commit77f6f233f8868d0706249621dcd931878c5de6b3 (patch)
treebcd09f80c615e6bdcae1412f9a9a54f91b1c1b90 /includes
parent6658273b36ffc64a6c2ba66bf08cda9f3923252d (diff)
downloadbrdo-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.inc6
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";
}
/**