|
|
|
@@ -367,6 +367,149 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
|
|
|
|
);
|
|
|
|
|
} //end not-inserting check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form['contact-details'] = array(
|
|
|
|
|
'#type' => 'fieldset',
|
|
|
|
|
'#title' => 'Contact details',
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_email'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('E-mail address'),
|
|
|
|
|
'#maxlength' => 100,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_email) ? $data->booking_email : ''
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$form['contact-details']['booking_phone'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Home Phone Number'),
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#size' => 35,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => !empty($data->booking_phone) ? $data->booking_phone : ''
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_mobile'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Mobile Phone Number'),
|
|
|
|
|
'#size' => 35,
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => !empty($data->booking_mobile) ? $data->booking_mobile : ''
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$form['contact-details']['booking_street'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Street Address'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_street) ? $data->booking_street : ''
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_suburb'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Suburb'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_suburb) ? $data->booking_suburb : ''
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($inserting == TRUE)
|
|
|
|
|
{
|
|
|
|
|
$form['contact-details']['booking_state'] = array(
|
|
|
|
|
'#type' => 'select',
|
|
|
|
|
'#title' => t('State'),
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_state) ? $data->booking_state : BOOKING_DEFAULT_STATE,
|
|
|
|
|
'#options' => _booking_state_options(),
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_other_state'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Please specify state'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#states' => array(
|
|
|
|
|
// Only show this field when the 'booking_state' is set to other.
|
|
|
|
|
'visible' => array(
|
|
|
|
|
':input[name="booking_state"]' => array('value' => 'Other'),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
'#default_value' => '',
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
//when modifying the node just show the textfield
|
|
|
|
|
$form['contact-details']['booking_state'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('State'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#default_value' => !empty($data->booking_state) ? $data->booking_state : '',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form['contact-details']['booking_postcode'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Postal/Zip code'),
|
|
|
|
|
'#maxlength' => 8,
|
|
|
|
|
'#size' => 10,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_postcode) ? $data->booking_postcode : ''
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_country'] = array(
|
|
|
|
|
'#type' => 'select',
|
|
|
|
|
'#title' => t('Country'),
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => variable_get('booking_country', empty($data->booking_country) ? variable_get('booking_default_country') : $data->booking_country),
|
|
|
|
|
'#options' => _booking_country_options(),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
//emergency contact details
|
|
|
|
|
$form['emergency'] = array(
|
|
|
|
|
'#type' => 'fieldset',
|
|
|
|
|
'#title' => 'Emergency Contact Details',
|
|
|
|
|
'#description' => 'Please enter contact details for use in case of emergency',
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_name'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Parent/Guardian Name'),
|
|
|
|
|
'#maxlength' => 100,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_name) ? '' : $data->booking_guardian_name
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_type'] = array(
|
|
|
|
|
'#type' => 'radios',
|
|
|
|
|
'#title' => t('Relation to you'),
|
|
|
|
|
'#options' => $emergency_contact_type_options,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_type) ? 'parent' : $data->booking_guardian_type,
|
|
|
|
|
'#required' => TRUE
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_phone'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Contact Number'),
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#size' => 30,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_phone) ? '' : $data->booking_guardian_phone
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_phone_alt'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Alternate Contact Number'),
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#size' => 30,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_phone_alt) ? '' : $data->booking_guardian_phone_alt
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (variable_get('booking_enable_medicare', 1) == 1)
|
|
|
|
|
{
|
|
|
|
|
$form['emergency']['booking_medicare'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Your Medicare Number'),
|
|
|
|
|
'#maxlength' => 15,
|
|
|
|
|
'#size' => 15,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => empty($data->booking_medicare) ? '' : $data->booking_medicare
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (variable_get('booking_enable_passport', 0) == 1)
|
|
|
|
|
{
|
|
|
|
|
$form['passport-details'] = array(
|
|
|
|
@@ -536,148 +679,6 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
|
|
|
|
}
|
|
|
|
|
} //end passport only fields
|
|
|
|
|
|
|
|
|
|
$form['contact-details'] = array(
|
|
|
|
|
'#type' => 'fieldset',
|
|
|
|
|
'#title' => 'Contact details',
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_email'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('E-mail address'),
|
|
|
|
|
'#maxlength' => 100,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_email) ? $data->booking_email : ''
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$form['contact-details']['booking_phone'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Home Phone Number'),
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#size' => 35,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => !empty($data->booking_phone) ? $data->booking_phone : ''
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_mobile'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Mobile Phone Number'),
|
|
|
|
|
'#size' => 35,
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => !empty($data->booking_mobile) ? $data->booking_mobile : ''
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$form['contact-details']['booking_street'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Street Address'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_street) ? $data->booking_street : ''
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_suburb'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Suburb'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_suburb) ? $data->booking_suburb : ''
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($inserting == TRUE)
|
|
|
|
|
{
|
|
|
|
|
$form['contact-details']['booking_state'] = array(
|
|
|
|
|
'#type' => 'select',
|
|
|
|
|
'#title' => t('State'),
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_state) ? $data->booking_state : BOOKING_DEFAULT_STATE,
|
|
|
|
|
'#options' => _booking_state_options(),
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_other_state'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Please specify state'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#states' => array(
|
|
|
|
|
// Only show this field when the 'booking_state' is set to other.
|
|
|
|
|
'visible' => array(
|
|
|
|
|
':input[name="booking_state"]' => array('value' => 'Other'),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
'#default_value' => '',
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
//when modifying the node just show the textfield
|
|
|
|
|
$form['contact-details']['booking_state'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('State'),
|
|
|
|
|
'#maxlength' => 50,
|
|
|
|
|
'#default_value' => !empty($data->booking_state) ? $data->booking_state : '',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form['contact-details']['booking_postcode'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Postal/Zip code'),
|
|
|
|
|
'#maxlength' => 8,
|
|
|
|
|
'#size' => 10,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => !empty($data->booking_postcode) ? $data->booking_postcode : ''
|
|
|
|
|
);
|
|
|
|
|
$form['contact-details']['booking_country'] = array(
|
|
|
|
|
'#type' => 'select',
|
|
|
|
|
'#title' => t('Country'),
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => variable_get('booking_country', empty($data->booking_country) ? variable_get('booking_default_country') : $data->booking_country),
|
|
|
|
|
'#options' => _booking_country_options(),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
//emergency contact details
|
|
|
|
|
$form['emergency'] = array(
|
|
|
|
|
'#type' => 'fieldset',
|
|
|
|
|
'#title' => 'Emergency Contact Details',
|
|
|
|
|
'#description' => 'Please enter contact details for use in case of emergency',
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_name'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Parent/Guardian Name'),
|
|
|
|
|
'#maxlength' => 100,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_name) ? '' : $data->booking_guardian_name
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_type'] = array(
|
|
|
|
|
'#type' => 'radios',
|
|
|
|
|
'#title' => t('Relation to you'),
|
|
|
|
|
'#options' => $emergency_contact_type_options,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_type) ? 'parent' : $data->booking_guardian_type,
|
|
|
|
|
'#required' => TRUE
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_phone'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Contact Number'),
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#size' => 30,
|
|
|
|
|
'#required' => TRUE,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_phone) ? '' : $data->booking_guardian_phone
|
|
|
|
|
);
|
|
|
|
|
$form['emergency']['booking_guardian_phone_alt'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Alternate Contact Number'),
|
|
|
|
|
'#maxlength' => 30,
|
|
|
|
|
'#size' => 30,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => empty($data->booking_guardian_phone_alt) ? '' : $data->booking_guardian_phone_alt
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (variable_get('booking_enable_medicare', 1) == 1)
|
|
|
|
|
{
|
|
|
|
|
$form['emergency']['booking_medicare'] = array(
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
'#title' => t('Your Medicare Number'),
|
|
|
|
|
'#maxlength' => 15,
|
|
|
|
|
'#size' => 15,
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
'#default_value' => empty($data->booking_medicare) ? '' : $data->booking_medicare
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (variable_get('booking_enable_helpareas', 1) == 1)
|
|
|
|
|
{
|
|
|
|
|
$form['help-areas'] = array(
|
|
|
|
@@ -1856,6 +1857,7 @@ function booking_view($node, $view_mode) {
|
|
|
|
|
|
|
|
|
|
$rows[] = array(t('Payment Type Selected:'), t('!amount_paid', array('!amount_paid' => $payment_type)));
|
|
|
|
|
$rows[] = array(t('Amount Paid:'), t('!amount_paid', array('!amount_paid' => $node->booking_amount_paid)));
|
|
|
|
|
$rows[] = array(t('Payment Complete Flag:'), t('!ans', array('!ans' => $node->booking_payment_complete == 'Y' ? 'Yes' : 'No')));
|
|
|
|
|
$rows[] = array(t('Total Amount Due:'), t('!amount_paid', array('!amount_paid' => $node->booking_total_pay_reqd)));
|
|
|
|
|
$rows[] = array(t('Refund Due:'), t('!amount_due', array('!amount_due' => $node->booking_refund_due)));
|
|
|
|
|
$rows[] = array(t('Refund Processed:'), t('!ans', array('!ans' => ($node->booking_refund_processed == 'Y' ? 'Yes' : 'No'))));
|
|
|
|
|