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['notravelform'] = "People booked-in no travel form received";
|
||||
$preselection_options['notravelforminclwaiting'] = "People booked-in/waiting no travel form received";
|
||||
$preselection_options['leaderhelper'] = "Leaders/Helpers";
|
||||
$preselection_options['test'] = 'Testing';
|
||||
|
||||
$header = array(
|
||||
@@ -569,6 +570,14 @@ function _booking_email_get_default_selection_callback($form, $form_state) {
|
||||
$defaults[] = $person->nid;
|
||||
}
|
||||
break;
|
||||
case 'leaderhelper':
|
||||
foreach ($person as $key => $value) {
|
||||
if (preg_match('/^session(\d+)_role/', $key, $matches) &&
|
||||
$value > 0) {
|
||||
$defaults[] = $person->nid;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'test':
|
||||
if ($person->booking_lastname == 'Coad') {
|
||||
$defaults[] = $person->nid;
|
||||
|
Reference in New Issue
Block a user