manual email preselection updates

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

View File

@@ -293,7 +293,14 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
{
$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(
drupal_get_path('module', 'booking') . '/booking.css',
);
@@ -373,12 +380,12 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
}
$options[$data->nid]['group_roles'] = $group_text;
}
//handle any checkbox pre-selection for this attendee
if ($input_option == 'unpaid') {
$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;
$prefix .= t("<p>Pre-selecting only people with a status of booked-in</p>");
}
}