diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-07-03 19:13:49 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-07-03 19:13:49 +0000 |
commit | ef6deb6c9a790bc19b9387f2dd2bad658adb5ad9 (patch) | |
tree | 6607e386c69ab217f99ab5843e5a197baee4b3d7 /includes/form.inc | |
parent | 096058ac66ada549ba6b630a6beeef8ba5084f10 (diff) | |
download | brdo-ef6deb6c9a790bc19b9387f2dd2bad658adb5ad9.tar.gz brdo-ef6deb6c9a790bc19b9387f2dd2bad658adb5ad9.tar.bz2 |
- Patch #154299 by Eaton: button details are lost.
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/form.inc b/includes/form.inc index b15e8ed15..82261eb6c 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -762,6 +762,9 @@ function form_builder($form_id, $form, &$form_state) { // Internet Explorer button-click scenario. _form_builder_ie_cleanup($form, $form_state); + // After handling the special IE case, we no longer need the buttons collection. + unset($form_state['buttons']); + return $form; } @@ -877,6 +880,7 @@ function _form_builder_handle_input_element($form_id, &$form, &$form_state) { // the global variables. In this special case, we want to make sure that // the value of this element is listed in $form_variables under 'op'. $form_state['values'][$form['#name']] = $form['#value']; + $form_state['clicked_button'] = $form; if (isset($form['#validate'])) { $form_state['validate_handlers'] = $form['#validate']; @@ -913,9 +917,8 @@ function _form_builder_ie_cleanup($form, &$form_state) { $form_state['submit_handlers'] = empty($button['#submit']) ? NULL : $button['#submit']; $form_state['validate_handlers'] = empty($button['#validate']) ? NULL : $button['#validate']; $form_state['values'][$button['#name']] = $button['#value']; + $form_state['clicked_button'] = $button; } - // After handling the special IE case, we no longer need the buttons collection. - unset($form_state['buttons']); } } |