From 133617cb13c22e0b16119d69b257cd62602e0138 Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Thu, 4 May 2006 09:57:14 +0000 Subject: #57834 by chx, Replace theme_weight with more appropriate process_weight --- includes/form.inc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'includes/form.inc') diff --git a/includes/form.inc b/includes/form.inc index 16c49f265..92d25f4cc 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1071,22 +1071,16 @@ function theme_password($element) { } /** - * Format a weight selection menu. - * - * @param $element - * An associative array containing the properties of the element. - * Properties used: title, delta, description - * @return - * A themed HTML string representing the form. + * Expand weight elements into selects. */ -function theme_weight($element) { +function process_weight($element) { for ($n = (-1 * $element['#delta']); $n <= $element['#delta']; $n++) { $weights[$n] = $n; } $element['#options'] = $weights; $element['#type'] = 'select'; - - return form_render($element); + $element['#is_weight'] = TRUE; + return $element; } /** -- cgit v1.2.3