new test
This commit is contained in:
@@ -235,6 +235,19 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state)
|
||||
$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
|
||||
@@ -276,9 +289,18 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state)
|
||||
unset($form['table']);
|
||||
|
||||
// configure new tableselect based on old table select
|
||||
$form['table'] = $cached_form['form']['table'];
|
||||
$form['table'] = array (
|
||||
'#type' => 'tableselect',
|
||||
'#header' => $header,
|
||||
'#options' => $options,
|
||||
//'#default_value' => $values,
|
||||
'#empty' => t('No attendees found.'),
|
||||
'#attributes' => array('id' => 'sort-table'),
|
||||
'#prefix' => '<div id="manual-email-attendees-items">',
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
//unset($form_state['input']['table']);
|
||||
$form['table']['#options'] = $options;
|
||||
//$form['table']['#options'] = $options;
|
||||
|
||||
//set new default values
|
||||
$form['table']['#default_value'] = $new_default_values;
|
||||
|
Reference in New Issue
Block a user