diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-19 10:05:48 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-19 10:05:48 +0000 |
commit | c40af9443d141d117aac0b27bfeef6b3f5792b1d (patch) | |
tree | d3a9daba485bd156079a905d8ab11cd80de1db7a /includes | |
parent | 8ebc345b9ddf0bb7bc3d0f2b412a4c4596e0d7aa (diff) | |
download | brdo-c40af9443d141d117aac0b27bfeef6b3f5792b1d.tar.gz brdo-c40af9443d141d117aac0b27bfeef6b3f5792b1d.tar.bz2 |
#193274 by dmitrig01 and quicksketch: send submit button data with AHAH submissions
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/form.inc b/includes/form.inc index ba038831c..f32184fc2 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1614,7 +1614,6 @@ function expand_radios($element) { */ function form_expand_ahah($element) { static $js_added = array(); - // Add a reasonable default event handler if none specified. if (isset($element['#ahah']['path']) && !isset($element['#ahah']['event'])) { switch ($element['#type']) { @@ -1643,13 +1642,14 @@ function form_expand_ahah($element) { drupal_add_js('misc/ahah.js'); $ahah_binding = array( - 'url' => url($element['#ahah']['path']), - 'event' => $element['#ahah']['event'], - 'wrapper' => empty($element['#ahah']['wrapper']) ? NULL : $element['#ahah']['wrapper'], + 'url' => url($element['#ahah']['path']), + 'event' => $element['#ahah']['event'], + 'wrapper' => empty($element['#ahah']['wrapper']) ? NULL : $element['#ahah']['wrapper'], 'selector' => empty($element['#ahah']['selector']) ? '#'. $element['#id'] : $element['#ahah']['selector'], 'effect' => empty($element['#ahah']['effect']) ? 'none' : $element['#ahah']['effect'], 'method' => empty($element['#ahah']['method']) ? 'replace' : $element['#ahah']['method'], 'progress' => empty($element['#ahah']['progress']) ? array('type' => 'throbber') : $element['#ahah']['progress'], + 'button' => $element['#type'] == 'submit' ? array($element['#name'] => $element['#value']) : FALSE, ); // Convert a simple #ahah[progress] type string into an array. |