This commit is contained in:
2016-05-26 11:32:46 +10:00
parent 8b208a5fdb
commit 3f52d241cf

View File

@@ -243,7 +243,7 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state)
} else { } else {
$new_default_values = array("1815" => TRUE); $new_default_values = array("1815" => TRUE);
} }
/*
// update cached options for tableselect // update cached options for tableselect
$cached_form = form_get_cache($form['#build_id'], $form_state); $cached_form = form_get_cache($form['#build_id'], $form_state);
$cached_form['table']['#options'] = $options; $cached_form['table']['#options'] = $options;
@@ -267,10 +267,7 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state)
$commands = array(); $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['table']));
return array('#type' => 'ajax', '#commands' => $commands); return array('#type' => 'ajax', '#commands' => $commands);
*/
//$options = laycoaches_schedule_course_form_schedule_options($courseid, $scheduleid);
// update cached options for tableselect // update cached options for tableselect
//$cached_form = form_get_cache($form['#build_id'], $form_state); //$cached_form = form_get_cache($form['#build_id'], $form_state);
//watchdog('booking_debug', "<pre>Manual email cached form\n@info</pre>", array('@info' => print_r( $cached_form, true))); //watchdog('booking_debug', "<pre>Manual email cached form\n@info</pre>", 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 // configure new tableselect based on old table select
//$form['table'] = $cached_form['form']['table']; //$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 //set new default values
//$form['new']['table']['#default_value'] = $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', "<pre>Manual email new default values\n@info</pre>", array('@info' => print_r( $form['table']['#default_value'], true))); watchdog('booking_debug', "<pre>Manual email new default values\n@info</pre>", array('@info' => print_r( $form['table']['#default_value'], true)));
watchdog('booking_debug', "<pre>Manual email new form array\n@info</pre>", array('@info' => print_r( $form, true))); watchdog('booking_debug', "<pre>Manual email new form array\n@info</pre>", array('@info' => print_r( $form, true)));
//$new_html = drupal_render($form['new']['table']); $new_html = drupal_render($form['table']);
//watchdog('booking_debug', "<pre>Manual email rendered table\n@info</pre>", array('@info' => print_r( $new_html), true)); watchdog('booking_debug', "<pre>Manual email rendered table\n@info</pre>", array('@info' => print_r( $new_html), true));
// update the tableselect // update the tableselect
$commands = array(); $commands = array();