diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-07-04 06:19:41 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-07-04 06:19:41 +0000 |
commit | f3aa87122efa054eb12b7b2f25dd95b81132c7c5 (patch) | |
tree | 316c409ff0e044324bb47b19cf5058142552f9ea /includes | |
parent | 3fddd70277d9549faf95f3149bd770091c486a72 (diff) | |
download | brdo-f3aa87122efa054eb12b7b2f25dd95b81132c7c5.tar.gz brdo-f3aa87122efa054eb12b7b2f25dd95b81132c7c5.tar.bz2 |
- Textarea's did not have error handling support yet.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index 48d2a3e01..bd6b2b15e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -964,7 +964,9 @@ function form_set_error($name, $message) { * Return true when errors have been set. */ function form_has_errors() { - return array_key_exists('form', $GLOBALS); + if (array_key_exists('form', $GLOBALS)) { + return $GLOBALS['form']; + } } /** @@ -1040,7 +1042,7 @@ function form_password($title, $name, $value, $size, $maxlength, $description = function form_textarea($title, $name, $value, $cols, $rows, $description = NULL, $attributes = NULL, $required = FALSE) { $cols = $cols ? " cols=\"$cols\"" : ""; module_invoke_all("textarea", $name); // eg. optionally plug in a WYSIWYG editor - return theme("form_element", $title, "<textarea wrap=\"virtual\"$cols rows=\"$rows\" name=\"edit[$name]\" id=\"$name\"". drupal_attributes($attributes) .">". check_form($value) ."</textarea>", $description, $name, $required, _form_get_error($name)); + return theme("form_element", $title, "<textarea wrap=\"virtual\"$cols rows=\"$rows\" name=\"edit[$name]\" id=\"$name\" class=\"". _form_get_class('textarea', $required, _form_get_error($name)) ."\"". drupal_attributes($attributes) .">". check_form($value) ."</textarea>", $description, $name, $required, _form_get_error($name)); } /** |