From 045074d4c51025a7c1561a9bf2e2a8b05441b23d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 16 Oct 2009 19:20:34 +0000 Subject: - Patch #557272 by kkaefer, Rob Loach, quicksketch: added FAPI JavaScript States system. --- includes/form.inc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'includes/form.inc') diff --git a/includes/form.inc b/includes/form.inc index 207a48c0a..e2d281384 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2181,6 +2181,39 @@ function form_process_checkboxes($element) { return $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 '
' . $element['#children'] . '
'; +} + /** * Format a table with radio buttons or checkboxes. * -- cgit v1.2.3