Add comment field and tweak email logging

This commit is contained in:
2015-09-17 09:44:47 +10:00
parent 512366deb9
commit 270dd5b43f
5 changed files with 60 additions and 20 deletions

View File

@@ -164,6 +164,18 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
// The status field should not be visible unless this registration is being updated...i.e. not at actual registration time...
if ($inserting != TRUE) {
$form['your-details']['booking_comment_field'] = array(
'#type' => 'textarea',
'#title' => t('Comments relating to this registration. Internal only.'),
'#cols' => 60,
'#rows' => 5,
'#resizable' => TRUE,
'#required' => FALSE,
'#attributes' => array('maxlength' => 1000),
'#default_value' => !empty($data->booking_comment_field) ? $data->booking_comment_field : '',
);
$form['your-details']['booking_status'] = array(
'#type' => 'select',
'#title' => t('Registration Status'),
@@ -219,9 +231,9 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
'#maxlength' => 10,
'#required' => FALSE,
'#default_value' => !empty($data->booking_refund_due) ? $data->booking_refund_due : '0.00'
);
);
} //end inserting check for booking status
} //end inserting check for admin-only fields
//tshirts
if (variable_get('booking_enable_tshirts', 0) == 1)
@@ -1348,7 +1360,8 @@ function booking_form_submit($form, &$form_state) {
$node->booking_skills_language_details = empty($values['booking_skills_language_details']) ? 'N/A' : $values['booking_skills_language_details'];
$node->booking_skills_other = empty($values['booking_skills_other']) ? 'N' : ($values['booking_skills_other'] == 1 ? 'Y' : 'N');
$node->booking_skills_other_details = empty($values['booking_skills_other_details']) ? 'N/A' : $values['booking_skills_other_details'];
$node->booking_comment_field = empty($values['booking_comment_field']) ? '' : $values['booking_comment_field'];
//potential fields for future
//$node->booking_payment_method = $payment_method;
$node->booking_room_mate1 = empty($values['booking_room_mate1']) ? '' : $values['booking_room_mate1'];