diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-11-23 08:21:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-11-23 08:21:08 +0000 |
commit | 5736cc3e94ea5d3fd64e76324c1edc9d356accc5 (patch) | |
tree | e4a3e0d3e0de27d03915479914d7df48f6b28655 | |
parent | fa771b971b811e9e95b8df995f965a5389ea187e (diff) | |
download | brdo-5736cc3e94ea5d3fd64e76324c1edc9d356accc5.tar.gz brdo-5736cc3e94ea5d3fd64e76324c1edc9d356accc5.tar.bz2 |
- Patch #38349 by chx: form API bugfixes.
-rw-r--r-- | modules/filter.module | 4 | ||||
-rw-r--r-- | modules/filter/filter.module | 4 | ||||
-rw-r--r-- | modules/system.module | 4 | ||||
-rw-r--r-- | modules/system/system.module | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/modules/filter.module b/modules/filter.module index 1380cfdb4..41e6ad399 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -770,7 +770,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) { $form['format'] = array('#type' => 'fieldset', '#title' => t('Input format'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -16); // Multiple formats available: display radio buttons with tips. foreach ($formats as $format) { - $form['format'][$format->format] = array('#type' => 'filter_format', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#valid' => 'filter_form'); + $form['format'][$format->format] = array('#type' => 'filter_format', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#validate' => 'filter_form_validate'); } return $form; } @@ -797,7 +797,7 @@ function theme_filter_format($element) { return $output; } -function filter_form_valid($element) { +function filter_form_validate($element) { static $validated; if ($validated) { return; diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 1380cfdb4..41e6ad399 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -770,7 +770,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) { $form['format'] = array('#type' => 'fieldset', '#title' => t('Input format'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -16); // Multiple formats available: display radio buttons with tips. foreach ($formats as $format) { - $form['format'][$format->format] = array('#type' => 'filter_format', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#valid' => 'filter_form'); + $form['format'][$format->format] = array('#type' => 'filter_format', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#validate' => 'filter_form_validate'); } return $form; } @@ -797,7 +797,7 @@ function theme_filter_format($element) { return $output; } -function filter_form_valid($element) { +function filter_form_validate($element) { static $validated; if ($validated) { return; diff --git a/modules/system.module b/modules/system.module index a2c6e5a11..6c37fd071 100644 --- a/modules/system.module +++ b/modules/system.module @@ -59,8 +59,8 @@ function system_elements() { // Inputs $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1); - $type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#execute' => TRUE); - $type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#execute' => FALSE); + $type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#form_submitted' => TRUE); + $type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#form_submitted' => FALSE); $type['textfield'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#autocomplete_path' => FALSE); $type['password'] = array('#input' => TRUE, '#size' => 30, '#maxlength' => 64); $type['textarea'] = array('#input' => TRUE, '#cols' => 60, '#rows' => 5); diff --git a/modules/system/system.module b/modules/system/system.module index a2c6e5a11..6c37fd071 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -59,8 +59,8 @@ function system_elements() { // Inputs $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1); - $type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#execute' => TRUE); - $type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#execute' => FALSE); + $type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#form_submitted' => TRUE); + $type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#form_submitted' => FALSE); $type['textfield'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#autocomplete_path' => FALSE); $type['password'] = array('#input' => TRUE, '#size' => 30, '#maxlength' => 64); $type['textarea'] = array('#input' => TRUE, '#cols' => 60, '#rows' => 5); |