add logistics email token

This commit is contained in:
Nathan Coad
2016-06-18 12:06:01 +10:00
parent 9fe4bfe101
commit 1e912f526c
2 changed files with 7 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ function booking_admin()
$form['email']['booking_logistics_email'] = array(
'#type' => 'textfield',
'#title' => t('Logistics Email Address'),
'#description' => t("The email address used for logistics information."),
'#description' => t("The email address used for logistics information like travel forms etc."),
'#size' => 60,
'#maxlength' => 150,
'#required' => TRUE,

View File

@@ -381,6 +381,10 @@ function booking_token_info() {
'name' => t('Event Contact Email'),
'description' => t('Contact email address for the current event.')
);
$info['tokens']['booking']['logistics-email'] = array(
'name' => t('Event Logistics Email'),
'description' => t('Logistics email address for the current event.')
);
$info['tokens']['booking']['eventdates'] = array(
'name' => t('Event Dates'),
'description' => t('Dates of the current event.')
@@ -538,6 +542,7 @@ function booking_define_tokens()
date("Y-m-d", $booking_times->booking_event_end));
$tokens['contact-us'] = l('contact us', 'contact-us');
$tokens['contact-email'] = variable_get('booking_contact_email');
$tokens['logistics-email'] = variable_get('booking_logistics_email');
$tokens['regn-count'] = $regncount_query->num_ppl;
$tokens['regn-limit'] = variable_get('booking_regn_limit',0);
return $tokens;
@@ -582,6 +587,7 @@ function booking_define_personspecific_tokens($node)
$tokens = array();
$tokens['eventname'] = $event->booking_eventname;
$tokens['contact-email'] = variable_get('booking_contact_email');
$tokens['logistics-email'] = variable_get('booking_logistics_email');
$tokens['team-colour'] = ucwords($node->booking_readinggroup);
$tokens['fname'] = ucwords(trim($node->booking_firstname));
$tokens['lname'] = ucwords(trim($node->booking_lastname));