From c98ae4d095305be1c5c8160f04be772b059b2a55 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 26 May 2016 13:27:34 +1000 Subject: [PATCH] test more --- booking.emails.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/booking.emails.inc b/booking.emails.inc index 4118af5..6cc8bdd 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -42,7 +42,7 @@ function booking_manual_email() '#options' => array("---" => "---", "Unpaid" => "Unpaid", "Waiting List" => "Waiting List"), '#default_value' => "---", '#ajax' => array( - 'callback' => '_booking_manual_email_selecttype_dropdown_callback', + 'callback' => '_booking_manual_email_selecttype_ajax_callback', 'wrapper' => 'manual-email-attendees-items', 'event' => 'change', ), @@ -126,7 +126,7 @@ function booking_manual_email() '#multiple' => TRUE, '#header' => $header, '#options' => $options, - //'#default_value' => array("1812" => TRUE, "1813" => FALSE), + '#default_value' => array("1812" => TRUE, "1813" => FALSE), '#empty' => t('No attendees found.'), '#attributes' => array('id' => 'sort-table'), '#prefix' => '
', @@ -224,7 +224,7 @@ function _booking_manual_email_generate_options() { */ } -function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) { +function _booking_manual_email_selecttype_ajax_callback($form, &$form_state) { $select_type = $form_state['values']['select-type']; @@ -252,6 +252,7 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) $new_default_values = array("1815" => TRUE); } + unset($form['table']); $form['table']['#options'] = $options; $form['table']['#header'] = $header; $form['table']['#default_value'] = $new_default_values;