This commit is contained in:
2017-09-07 16:03:18 +10:00
parent 14fb815c97
commit aff52e4349
2 changed files with 7 additions and 1 deletions

View File

@@ -1316,8 +1316,13 @@ function _booking_details_email_summary($node) {
$rows[] = t('Name: !first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname));
$rows[] = t('Gender: !gender', array('!gender' => $node->booking_gender == 'M' ? 'Male' : 'Female'));
$rows[] = t('Date of birth: !dob', array('!dob' => _booking_convert_ts($node->booking_dob)->format('d/m/Y')));
if (variable_get('booking_enable_earlyaccess_codes', 0) == 1) {
$rows[] = array(t('Early Access Code:'), t('!code', array('!code' => $node->booking_earlyaccess_code)));
//look up the actual code since the booking_person node available at this time only has the primary key for that table
$earlyaccess_query = db_query("SELECT booking_earlyaccess_code FROM {booking_earlyaccess_codes} where cid = :code",
array(':code' => $values['booking_earlyaccess_code_id']))
->fetchObject();
$rows[] = array(t('Early Access Code:'), t('!code', array('!code' => $earlyaccess_query->booking_earlyaccess_code)));
}
/*

View File

@@ -1344,6 +1344,7 @@ function booking_form_submit($form, &$form_state)
$node->booking_skills_other_details = empty($values['booking_skills_other_details']) ? 'N/A' : $values['booking_skills_other_details'];
$node->booking_earlyaccess_code_id = empty($values['booking_earlyaccess_code']) ? '' : $earlyaccess_query->cid;
$node->booking_song_choice = empty($values['booking_song_choice']) ? '' : $values['booking_song_choice'];
$node->booking_freestyle_text = empty($values['booking_freestyle_text']) ? '' : $values['booking_freestyle_text'];
//remove newlines from these fields so the CSV output doesn't get messed up
$medical = empty($values['booking_medical_conditions']) ? 'N/A' : $values['booking_medical_conditions'];