add preselection for leaders/helpers
This commit is contained in:
@@ -304,6 +304,7 @@ function booking_manual_email_form($form, &$form_state)
|
|||||||
$preselection_options['unpaid'] = 'People booked-in with outstanding balance';
|
$preselection_options['unpaid'] = 'People booked-in with outstanding balance';
|
||||||
$preselection_options['notravelform'] = "People booked-in no travel form received";
|
$preselection_options['notravelform'] = "People booked-in no travel form received";
|
||||||
$preselection_options['notravelforminclwaiting'] = "People booked-in/waiting no travel form received";
|
$preselection_options['notravelforminclwaiting'] = "People booked-in/waiting no travel form received";
|
||||||
|
$preselection_options['leaderhelper'] = "Leaders/Helpers";
|
||||||
$preselection_options['test'] = 'Testing';
|
$preselection_options['test'] = 'Testing';
|
||||||
|
|
||||||
$header = array(
|
$header = array(
|
||||||
@@ -568,7 +569,15 @@ function _booking_email_get_default_selection_callback($form, $form_state) {
|
|||||||
if (($person->booking_status == 1 || $person->booking_status == 2) && $person->tid == 0) {
|
if (($person->booking_status == 1 || $person->booking_status == 2) && $person->tid == 0) {
|
||||||
$defaults[] = $person->nid;
|
$defaults[] = $person->nid;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'leaderhelper':
|
||||||
|
foreach ($person as $key => $value) {
|
||||||
|
if (preg_match('/^session(\d+)_role/', $key, $matches) &&
|
||||||
|
$value > 0) {
|
||||||
|
$defaults[] = $person->nid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'test':
|
case 'test':
|
||||||
if ($person->booking_lastname == 'Coad') {
|
if ($person->booking_lastname == 'Coad') {
|
||||||
$defaults[] = $person->nid;
|
$defaults[] = $person->nid;
|
||||||
|
Reference in New Issue
Block a user