fix manual email to not include reference to travel form when not enabled

This commit is contained in:
Nathan Coad
2017-01-11 08:06:29 +11:00
parent e89f48b17d
commit f02b4bf53b
6 changed files with 209 additions and 1 deletions

View File

@@ -318,7 +318,6 @@ function booking_manual_email_form($form, &$form_state)
'amount_reqd' => array('data' => t('Total Payment Required'), 'field' => 'booking_total_pay_reqd'),
'booking_fully_paid' => array('data' => t('Fully paid?'), 'field' => 'booking_payment_complete'),
'welfare_required' => array('data' => t('Welfare Required?'), 'field' => 'booking_welfare_required'),
'travel_form' => array('data' => t('Travel Submitted?'), 'field' => 'tid'),
);
//add in the custom email types
@@ -392,6 +391,11 @@ function booking_manual_email_form($form, &$form_state)
'#type' => 'submit',
'#value' => t('Send Email'),
);
if (variable_get('booking_enable_travelform', 0) == 1) {
$header['travel_form'] = array('data' => t('Travel Submitted?'), 'field' => 'tid');
}
//query the database for studygroup info if it is enabled
if (variable_get('booking_enable_studygroups', 0) == 1)