summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-11-06 18:27:58 +0000
committerDries Buytaert <dries@buytaert.net>2003-11-06 18:27:58 +0000
commit00d638ca5790cac5cf1d7b195e07d17f9cbb80a4 (patch)
treedb1d3fa5b564953897099c3189210a72aebcb0f6 /includes/common.inc
parent6735be099233e1455d3e821db3767cfbbf892980 (diff)
downloadbrdo-00d638ca5790cac5cf1d7b195e07d17f9cbb80a4.tar.gz
brdo-00d638ca5790cac5cf1d7b195e07d17f9cbb80a4.tar.bz2
- Usability improvement: replaced many selection boxes by radio buttons.
Patch by Stefan. - Usability improvement: introduced a form_group() function and updated the node and comment module to take advantage of it. Patch #149 by Eric Farris.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 435318165..a0aa2d13a 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -905,6 +905,9 @@ function form($form, $method = "post", $action = 0, $options = 0) {
function form_item($title, $value, $description = 0) {
return "<div class=\"form-item\">". ($title ? "<div class=\"title\">$title:</div>" : "") . $value . ($description ? "<div class=\"description\">$description</div>" : "") ."</div>\n";
}
+function form_group($legend, $group, $description = 0) {
+ return "<fieldset>" . ($legend ? "<legend>$legend</legend>" : "") . $group . ($description ? "<div class=\"description\">$description</div>" : "") . "</fieldset>\n";
+}
function form_radio($title, $name, $value = 1, $checked = 0, $description = 0, $attributes = 0) {
return form_item(0, "<input type=\"radio\" class=\"form-radio\" name=\"edit[$name]\" value=\"". $value ."\"". ($checked ? " checked=\"checked\"" : "") . drupal_attributes($attributes) ." /> $title", $description);