summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-11-17 19:16:55 +0000
committerDries Buytaert <dries@buytaert.net>2003-11-17 19:16:55 +0000
commitfff2f548ac77ac06da132edb013f2e7456cf4393 (patch)
treebd92fa0e16ace061c4b8e7d3808a1ac66e34eb8f /includes/theme.inc
parente27df450ab49085923bf4917cd7a291091048203 (diff)
downloadbrdo-fff2f548ac77ac06da132edb013f2e7456cf4393.tar.gz
brdo-fff2f548ac77ac06da132edb013f2e7456cf4393.tar.bz2
- Improved form items: added <label> tags to improve accessibility and added
theme_form_element() function to improve themeability. I left form_item() and the calls to form_item() intact for now.
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index ae284d34d..6dfff30bd 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -145,6 +145,19 @@ function _theme_table_cell($cell, $header = 0) {
return $output;
}
+/**
+ Returns themed table.
+
+ @param $title the form element's title
+ @param $value the form element's data
+ @param $description the form element's description or explanation
+
+ @return a string contraining the \a node output.
+**/
+
+function theme_form_element($title, $value, $description = 0) {
+ return "<div class=\"form-item\">". ($title ? "<label>$title:</label>" : "") . $value . ($description ? "<div class=\"description\">$description</div>" : "") ."</div>\n";
+}
/**
Returns themed table.