From a507c3f2194f9b59fb24193fd1f5825f98e6dd23 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Wed, 2 May 2018 15:29:18 +1000 Subject: [PATCH] test ajax_deliver --- booking.variety_form.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/booking.variety_form.inc b/booking.variety_form.inc index 37a9c81..066abed 100644 --- a/booking.variety_form.inc +++ b/booking.variety_form.inc @@ -161,12 +161,14 @@ function booking_variety_session_callback($form, &$form_state) { //$form['variety-sessions'][$fieldname]['#title'] = t('Rebuilt Variety Session: ' . $timeslot->booking_variety_time_descrip); // Tell drupal to update the wrapper for this field - //$commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . '_wrapper', drupal_render($form[$fieldname])); - $commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . '_wrapper', drupal_render($form)); + $commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . '_wrapper', drupal_render($form[$fieldname])); + //$commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . '_wrapper', drupal_render($form)); } //$form_state['rebuild'] = TRUE; - return array('#type' => 'ajax', '#commands' => $commands); + //return array('#type' => 'ajax', '#commands' => $commands); + $page = array('#type' => 'ajax', '#commands' => $commands); + ajax_deliver($page); } @@ -188,7 +190,7 @@ function _booking_get_variety_timeslot_options($timeslot_id) { $session_options[$session->vid] = $session->booking_variety_descrip; } } - watchdog('booking_debug', "
Variety Session Options:\n@info
", array('@info' => print_r( $session_options, true))); + //watchdog('booking_debug', "
Variety Session Options:\n@info
", array('@info' => print_r( $session_options, true))); return $session_options; }