diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-16 19:20:34 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-16 19:20:34 +0000 |
commit | 045074d4c51025a7c1561a9bf2e2a8b05441b23d (patch) | |
tree | bf64736c76784709788e4f6dc91acdbe9a01ddd2 /includes/form.inc | |
parent | 60c5878351cc547dbfda260fefcf378491c958ec (diff) | |
download | brdo-045074d4c51025a7c1561a9bf2e2a8b05441b23d.tar.gz brdo-045074d4c51025a7c1561a9bf2e2a8b05441b23d.tar.bz2 |
- Patch #557272 by kkaefer, Rob Loach, quicksketch: added FAPI JavaScript States system.
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc index 207a48c0a..e2d281384 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2182,6 +2182,39 @@ function form_process_checkboxes($element) { } /** + * Processes a container element. + * + * @param $element + * An associative array containing the properties and children of the + * container. + * @param $form_state + * The $form_state array for the form this element belongs to. + * @return + * The processed element. + */ +function form_process_container($element, &$form_state) { + $element['#id'] = drupal_html_id(implode('-', $element['#parents']) . '-wrapper'); + return $element; +} + +/** + * Adds a container for grouped items + * + * @param $element + * An associative array containing the properties and children of the + * group. + * Properties used: #children. + * @return + * A themed HTML string representing the form element. + * + * @ingroup themeable + */ +function theme_container($variables) { + $element = $variables['element']; + return '<div class="form-wrapper" id="' . $element['#id'] . '">' . $element['#children'] . '</div>'; +} + +/** * Format a table with radio buttons or checkboxes. * * @param $variables |