Separate email definitions
This commit is contained in:
@@ -54,6 +54,7 @@ function booking_roomallocations_view_summary() {
|
|||||||
'booking_lastname' => array('data' => t('Last Name'), 'field' => 'p.booking_lastname', 'sort' => 'asc'),
|
'booking_lastname' => array('data' => t('Last Name'), 'field' => 'p.booking_lastname', 'sort' => 'asc'),
|
||||||
'booking_gender' => array('data' => t('Gender'), 'field' => 'p.booking_gender'),
|
'booking_gender' => array('data' => t('Gender'), 'field' => 'p.booking_gender'),
|
||||||
'booking_age' => array('data' => t('Age'), 'field' => 'p.booking_dob'),
|
'booking_age' => array('data' => t('Age'), 'field' => 'p.booking_dob'),
|
||||||
|
'booking_married' => array('data' => t('Married?'), 'field' => 'p.booking_married'),
|
||||||
'booking_roomlocation' => array('data' => t('Room Location'), 'field' => 'r.booking_room_location_id'),
|
'booking_roomlocation' => array('data' => t('Room Location'), 'field' => 'r.booking_room_location_id'),
|
||||||
'booking_room_num' => array('data' => t('Room Number'), 'field' => 'r.booking_room_number'),
|
'booking_room_num' => array('data' => t('Room Number'), 'field' => 'r.booking_room_number'),
|
||||||
'booking_room_bedtype' => array('data' => t('Bed Type'), 'field' => 'm.booking_room_bedtype')
|
'booking_room_bedtype' => array('data' => t('Bed Type'), 'field' => 'm.booking_room_bedtype')
|
||||||
@@ -78,6 +79,7 @@ function booking_roomallocations_view_summary() {
|
|||||||
$data->booking_lastname,
|
$data->booking_lastname,
|
||||||
$data->booking_gender == 'M' ? 'Male' : 'Female',
|
$data->booking_gender == 'M' ? 'Male' : 'Female',
|
||||||
_booking_get_age_years($data->booking_dob),
|
_booking_get_age_years($data->booking_dob),
|
||||||
|
$data->booking_married == 'Y' ? 'Yes' : 'No',
|
||||||
_booking_room_location_lookup($data->booking_room_location_id),
|
_booking_room_location_lookup($data->booking_room_location_id),
|
||||||
$data->booking_room_number,
|
$data->booking_room_number,
|
||||||
_booking_room_bedtype_lookup($data->booking_room_bedtype),
|
_booking_room_bedtype_lookup($data->booking_room_bedtype),
|
||||||
|
@@ -323,7 +323,7 @@ $booking_registration_intro_text = variable_get('booking_registration_intro_text
|
|||||||
/*Text for emails*/
|
/*Text for emails*/
|
||||||
$form['emails'] = array(
|
$form['emails'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
'#title' => 'Email Text Definitions',
|
'#title' => 'Builtin Email Text Definitions',
|
||||||
'#collapsible' => TRUE,
|
'#collapsible' => TRUE,
|
||||||
'#collapsed' => TRUE,
|
'#collapsed' => TRUE,
|
||||||
);
|
);
|
||||||
@@ -409,19 +409,27 @@ $booking_registration_intro_text = variable_get('booking_registration_intro_text
|
|||||||
'#default_value' => variable_get('booking_email_missedpayment', ''),
|
'#default_value' => variable_get('booking_email_missedpayment', ''),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*Text for emails*/
|
||||||
|
$form['custom-emails'] = array(
|
||||||
|
'#type' => 'fieldset',
|
||||||
|
'#title' => 'Custom Email Text Definitions',
|
||||||
|
'#collapsible' => TRUE,
|
||||||
|
'#collapsed' => TRUE,
|
||||||
|
);
|
||||||
|
|
||||||
//add a bunch of custom emails
|
//add a bunch of custom emails
|
||||||
for ($i = 1; $i <= variable_get('booking_custom_email_count','5'); $i++)
|
for ($i = 1; $i <= variable_get('booking_custom_email_count','5'); $i++)
|
||||||
{
|
{
|
||||||
$subject_fieldname = 'booking_email_subject_custom' . $i;
|
$subject_fieldname = 'booking_email_subject_custom' . $i;
|
||||||
$body_fieldname = 'booking_email_custom' . $i;
|
$body_fieldname = 'booking_email_custom' . $i;
|
||||||
$form['emails'][$subject_fieldname] = array (
|
$form['custom-emails'][$subject_fieldname] = array (
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t('Subject line for Custom Email ' . $i),
|
'#title' => t('Subject line for Custom Email ' . $i),
|
||||||
'#size' => 150,
|
'#size' => 150,
|
||||||
'#maxlength' => 300,
|
'#maxlength' => 300,
|
||||||
'#default_value' => variable_get($subject_fieldname,'[booking:eventname]'),
|
'#default_value' => variable_get($subject_fieldname,'[booking:eventname]'),
|
||||||
);
|
);
|
||||||
$form['emails'][$body_fieldname] = array(
|
$form['custom-emails'][$body_fieldname] = array(
|
||||||
'#title' => t('Email text for custom email ' . $i),
|
'#title' => t('Email text for custom email ' . $i),
|
||||||
'#type' => 'textarea',
|
'#type' => 'textarea',
|
||||||
'#description' => t(''),
|
'#description' => t(''),
|
||||||
|
Reference in New Issue
Block a user