diff --git a/booking.emails.inc b/booking.emails.inc index dc0a4e8..d84ceb6 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -243,7 +243,7 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) } else { $new_default_values = array("1815" => TRUE); } - + /* // update cached options for tableselect $cached_form = form_get_cache($form['#build_id'], $form_state); $cached_form['table']['#options'] = $options; @@ -267,10 +267,7 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) $commands = array(); $commands[] = ajax_command_replace('#manual-email-attendees-items', drupal_render($form['table'])); return array('#type' => 'ajax', '#commands' => $commands); - - - //$options = laycoaches_schedule_course_form_schedule_options($courseid, $scheduleid); - + */ // update cached options for tableselect //$cached_form = form_get_cache($form['#build_id'], $form_state); //watchdog('booking_debug', "
Manual email cached form\n@info", array('@info' => print_r( $cached_form, true))); @@ -280,7 +277,8 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) // configure new tableselect based on old table select //$form['table'] = $cached_form['form']['table']; - $form['table'] = _booking_manual_email_generate_tableselect(); + unset($form_state['input']['table']); + $form['table']['#options'] = $options; //set new default values //$form['new']['table']['#default_value'] = $new_default_values; @@ -288,8 +286,8 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) watchdog('booking_debug', "
Manual email new default values\n@info", array('@info' => print_r( $form['table']['#default_value'], true))); watchdog('booking_debug', "
Manual email new form array\n@info", array('@info' => print_r( $form, true))); - //$new_html = drupal_render($form['new']['table']); - //watchdog('booking_debug', "
Manual email rendered table\n@info", array('@info' => print_r( $new_html), true)); + $new_html = drupal_render($form['table']); + watchdog('booking_debug', "
Manual email rendered table\n@info", array('@info' => print_r( $new_html), true)); // update the tableselect $commands = array();