From 77f6f233f8868d0706249621dcd931878c5de6b3 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Thu, 5 May 2005 09:07:08 +0000
Subject: [PATCH] - Modified patch #21980 by willmoy: made form_group() accept
 HTML attributes.

---
 includes/common.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/includes/common.inc b/includes/common.inc
index 2531fc992505..f279fe384b0d 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";
 }
 
 /**
-- 
GitLab