back to [new]
This commit is contained in:
@@ -173,29 +173,14 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state)
|
|||||||
$form['new']['table'] = $cached_form['form']['table'];
|
$form['new']['table'] = $cached_form['form']['table'];
|
||||||
watchdog('booking_debug', "<pre>Manual email new form table\n@info</pre>", array('@info' => print_r( $form['new']['table'], true)));
|
watchdog('booking_debug', "<pre>Manual email new form table\n@info</pre>", array('@info' => print_r( $form['new']['table'], true)));
|
||||||
//set new default values
|
//set new default values
|
||||||
//$cached_form['table']['#default_value'] = $new_default_values;
|
|
||||||
$form['new']['table']['#default_value'] = $new_default_values;
|
$form['new']['table']['#default_value'] = $new_default_values;
|
||||||
|
watchdog('booking_debug', "<pre>Manual email new default values\n@info</pre>", array('@info' => print_r( $form['new']['table']['#default_value'], true)));
|
||||||
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', "<pre>Manual email table form array\n@info</pre>", array('@info' => print_r( $form, true)));
|
watchdog('booking_debug', "<pre>Manual email table form array\n@info</pre>", array('@info' => print_r( $form, true)));
|
||||||
watchdog('booking_debug', "<pre>Manual email rendered table\n@info</pre>", array('@info' => print_r( drupal_render($form['table']), true)));
|
watchdog('booking_debug', "<pre>Manual email rendered table\n@info</pre>", array('@info' => print_r( drupal_render( $form['new']['table']), true)));
|
||||||
|
|
||||||
// update the tableselect
|
// update the tableselect
|
||||||
$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['new']['table']));
|
||||||
return array('#type' => 'ajax', '#commands' => $commands);
|
return array('#type' => 'ajax', '#commands' => $commands);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user