- Patch #154299 by Eaton: button details are lost.

6.x
Dries Buytaert 2007-07-03 19:13:49 +00:00
parent 096058ac66
commit ef6deb6c9a
1 changed files with 5 additions and 2 deletions

View File

@ -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']);
}
}