This commit is contained in:
2016-05-26 11:59:35 +10:00
parent 3dd0f58a9b
commit d02a367648

View File

@@ -230,6 +230,19 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state)
$select_type = $form_state['values']['select-type'];
$new_default_values = array();
$options = _booking_manual_email_generate_options();
$header = array(
'booking_nid' => array('data' => t('Id'), 'field' => 'nid', 'sort' => 'asc'),
'booking_name' => array('data' => t('Name'), 'field' => 'booking_lastname'),
'booking_gender' => array('data' => t('Gender'), 'field' => 'booking_gender'),
'booking_email' => array('data' => t('Email'), 'field' => 'booking_email'),
'booking_state' => array('data' => t('State'), 'field' => 'booking_state'),
'booking_status' => array('data' => t('Status'), 'field' => 'booking_status'),
'amount_paid' => array('data' => t('Payment To Date'), 'field' => 'booking_amount_paid'),
'amount_reqd' => array('data' => t('Total Payment Required'), 'field' => 'booking_total_pay_reqd'),
'booking_fully_paid' => array('data' => t('Fully paid?'), 'field' => 'booking_payment_complete'),
'welfare_required' => array('data' => t('Welfare Required?'), 'field' => 'booking_welfare_required'),
'travel_form' => array('data' => t('Travel Submitted?'), 'field' => 'tid'),
);
// generate new default values
// @todo use a function for this
@@ -238,7 +251,7 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state)
} else {
$new_default_values = array("1815" => TRUE);
}
$form['table']['#header'] = $header;
$form['table']['#options'] = $options;
watchdog('booking_debug', "<pre>Manual email new form table\n@info</pre>", array('@info' => print_r( $form['table'], true)));
//$form['table']['#default_value'] = $new_default_values;