From 7c7310460cb795585593e2c9f24aa7d20b279276 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 26 May 2016 10:32:26 +1000 Subject: [PATCH] back to [new] --- booking.emails.inc | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/booking.emails.inc b/booking.emails.inc index a1fe8a2..363b0d1 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -173,29 +173,14 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) $form['new']['table'] = $cached_form['form']['table']; watchdog('booking_debug', "
Manual email new form table\n@info
", array('@info' => print_r( $form['new']['table'], true))); //set new default values - //$cached_form['table']['#default_value'] = $new_default_values; $form['new']['table']['#default_value'] = $new_default_values; - - form_set_cache($form['#build_id'], $cached_form, $form_state); - - - foreach (element_children($form['table']) as $key) { - if (is_numeric($key)) { - unset($form['table'][$key]); - } - } - - // add new radios to tableselect - form_builder($form['#form_id'], $form['table'], $form_state); - // remove current value - unset($form['table']['#default_value']); - unset($form['table']['#value']); - + watchdog('booking_debug', "
Manual email new default values\n@info
", array('@info' => print_r( $form['new']['table']['#default_value'], true))); watchdog('booking_debug', "
Manual email table form array\n@info
", array('@info' => print_r( $form, true))); - watchdog('booking_debug', "
Manual email rendered table\n@info
", array('@info' => print_r( drupal_render($form['table']), true))); + watchdog('booking_debug', "
Manual email rendered table\n@info
", array('@info' => print_r( drupal_render( $form['new']['table']), true))); + // update the tableselect $commands = array(); - $commands[] = ajax_command_replace('#manual-email-attendees-items', drupal_render($form['table'])); + $commands[] = ajax_command_replace('#manual-email-attendees-items', drupal_render( $form['new']['table'])); return array('#type' => 'ajax', '#commands' => $commands); }