diff --git a/booking.emails_admin.inc b/booking.emails_admin.inc index 16fe199..8ef19d6 100644 --- a/booking.emails_admin.inc +++ b/booking.emails_admin.inc @@ -286,7 +286,8 @@ function booking_manual_email_form($form, &$form_state) $preselection_options['---'] = "---"; $preselection_options['bookedin'] = 'People who are booked-in'; $preselection_options['unpaid'] = 'People booked-in with outstanding balance'; - $preselection_options['notravelform'] = "People who haven't submitted travel form"; + $preselection_options['notravelform'] = "People booked-in no travel form received"; + $preselection_options['notravelforminclwaiting'] = "People booked-in/waiting no travel form received"; $preselection_options['test'] = 'Testing'; $header = array( @@ -314,15 +315,7 @@ function booking_manual_email_form($form, &$form_state) $email_options_array['customlogistics' . $i] = variable_get('booking_email_subject_customlogistics' . $i, $event->booking_eventname . ' logistics custom ' . $i) . " **Logistics**"; } - /* - //add some indication of which people have been pre-selected, if any - if ($input_option == 'unpaid') { - $prefix .= t("

Pre-selecting people with outstanding payments.

"); - } - elseif ($input_option == 'bookedin') { - $prefix .= t("

Pre-selecting only people with a status of booked-in.

"); - } - */ + //attach css so we can customise colours for some people $form['#attached']['css'] = array( drupal_get_path('module', 'booking') . '/booking.css', @@ -372,7 +365,8 @@ function booking_manual_email_form($form, &$form_state) $form['booking-email-preselection'] = array( '#type' => 'select', - '#title' => t('Preselect Attendees'), + '#title' => t('Pre-select attendees from list'), + '#description' => t('Use this to select a large group of people based on pre-defined criteria.') '#options' => $preselection_options, '#default_value' => '---', '#suffix' => '
', @@ -507,10 +501,15 @@ function _booking_email_get_default_selection_callback($form, $form_state) { } break; case 'notravelform': - if ($person->tid == 0) { + if ($person->booking_status == 1 && $person->tid == 0) { $defaults[] = $person->nid; } - break; + break; + case 'notravelforminclwaiting': + if (($person->booking_status == 1 || $person->booking_status == 2) && $person->tid == 0) { + $defaults[] = $person->nid; + } + break; case 'test': if ($person->booking_lastname == 'Coad') { $defaults[] = $person->nid;