manual email preselection updates

This commit is contained in:
2016-06-02 10:46:26 +10:00
parent e5322da7fb
commit 945a6b77f6

View File

@@ -280,7 +280,7 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
$email_options_array['withdrawal'] = 'Withdrawal Processed Email'; $email_options_array['withdrawal'] = 'Withdrawal Processed Email';
$email_options_array['missedpayment'] = 'Missed Payment Email'; $email_options_array['missedpayment'] = 'Missed Payment Email';
$email_options_array['initialtravelrequired'] = 'Initial Travel Form Required Email'; $email_options_array['initialtravelrequired'] = 'Initial Travel Form Required Email';
$email_options_array['remindertravelrequired'] = 'Reminder Travel Form Required Email'; $email_options_array['remindertravelrequired'] = 'Reminder Travel Form Required Email';
$email_options_array['travelcomplete'] = 'Travel Form Complete Email'; $email_options_array['travelcomplete'] = 'Travel Form Complete Email';
//add in the custom email types //add in the custom email types
@@ -292,11 +292,18 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
for ($i = 1; $i <= 5; $i++) for ($i = 1; $i <= 5; $i++)
{ {
$email_options_array['customlogistics' . $i] = variable_get('booking_email_subject_customlogistics' . $i, $event->booking_eventname . ' logistics custom ' . $i); $email_options_array['customlogistics' . $i] = variable_get('booking_email_subject_customlogistics' . $i, $event->booking_eventname . ' logistics custom ' . $i);
} }
//add some indication of which people have been pre-selected, if any
if ($input_option == 'unpaid') {
$prefix .= t("<p>Pre-selecting people with outstanding payments.</p>");
}
elseif ($input_option == 'bookedin') {
$prefix .= t("<p>Pre-selecting only people with a status of booked-in</p>");
}
//attach css so we can customise colours for some people
$form['#attached']['css'] = array( $form['#attached']['css'] = array(
drupal_get_path('module', 'booking') . '/booking.css', drupal_get_path('module', 'booking') . '/booking.css',
); );
$form['email-type'] = array( $form['email-type'] = array(
'#type' => 'select', '#type' => 'select',
@@ -373,12 +380,12 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
} }
$options[$data->nid]['group_roles'] = $group_text; $options[$data->nid]['group_roles'] = $group_text;
} }
//handle any checkbox pre-selection for this attendee
if ($input_option == 'unpaid') { if ($input_option == 'unpaid') {
$values[$data->nid] = ($data->booking_payment_complete == 'Y' || $data->booking_status != 1) ? FALSE : TRUE; $values[$data->nid] = ($data->booking_payment_complete == 'Y' || $data->booking_status != 1) ? FALSE : TRUE;
$prefix .= t("<p>Pre-selecting people with outstanding payments.</p>"); }
} elseif ($input_option == 'bookedin') { elseif ($input_option == 'bookedin') {
$values[$data->nid] = $data->booking_status == 1 ? TRUE : FALSE; $values[$data->nid] = $data->booking_status == 1 ? TRUE : FALSE;
$prefix .= t("<p>Pre-selecting only people with a status of booked-in</p>");
} }
} }