diff --git a/booking.emails.inc b/booking.emails.inc index 6962c93..979fd4b 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -47,7 +47,7 @@ function booking_manual_email() ), ); - + $header = array( 'booking_nid' => array('data' => t('Id'), 'field' => 'nid', 'sort' => 'asc'), 'booking_name' => array('data' => t('Name'), 'field' => 'booking_lastname'), @@ -61,7 +61,7 @@ function booking_manual_email() 'welfare_required' => array('data' => t('Welfare Required?'), 'field' => 'booking_welfare_required'), 'travel_form' => array('data' => t('Travel Submitted?'), 'field' => 'tid'), ); - + /* if (variable_get('booking_enable_studygroups', 0) == 1) { //select entries from the study groups mapping table @@ -120,11 +120,11 @@ function booking_manual_email() $values[$data->nid] = ($data->booking_payment_complete == 'Y' || $data->booking_status != 1) ? FALSE : TRUE; } - + */ $form['table'] = array ( '#type' => 'tableselect', '#header' => $header, - '#options' => $options, + '#options' => _booking_manual_email_generate_options(), '#default_value' => $values, '#empty' => t('No attendees found.'), '#attributes' => array('id' => 'sort-table'), @@ -146,25 +146,11 @@ function booking_manual_email() ); } -function _booking_manual_email_generate_tableselect() { +function _booking_manual_email_generate_options() { global $event; $form = array (); $options = array (); - $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'), - ); - if (variable_get('booking_enable_studygroups', 0) == 1) { //select entries from the study groups mapping table