|
|
@@ -398,6 +398,13 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
|
|
|
//'#date_label_position' => 'within',
|
|
|
|
//'#date_label_position' => 'within',
|
|
|
|
'#date_year_range' => '+0:+13'
|
|
|
|
'#date_year_range' => '+0:+13'
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
$form['passport-details']['booking_travel_insurance'] = array(
|
|
|
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
|
|
|
'#title' => t('Travel insurance policy details'),
|
|
|
|
|
|
|
|
'#maxlength' => 120,
|
|
|
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
|
|
|
'#default_value' => !empty($data->booking_travel_insurance) ? $data->booking_travel_insurance : ''
|
|
|
|
|
|
|
|
);
|
|
|
|
if ($inserting == FALSE)
|
|
|
|
if ($inserting == FALSE)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$form['passport-details']['booking_destination_country'] = array(
|
|
|
|
$form['passport-details']['booking_destination_country'] = array(
|
|
|
@@ -407,6 +414,20 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
|
|
|
'#required' => FALSE,
|
|
|
|
'#required' => FALSE,
|
|
|
|
'#default_value' => !empty($data->booking_destination_country) ? $data->booking_destination_country : '',
|
|
|
|
'#default_value' => !empty($data->booking_destination_country) ? $data->booking_destination_country : '',
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
$form['passport-details']['booking_internal_flight_outbound'] = array(
|
|
|
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
|
|
|
'#title' => t('Internal flight details leaving conference'),
|
|
|
|
|
|
|
|
'#maxlength' => 120,
|
|
|
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
|
|
|
'#default_value' => !empty($data->booking_internal_flight_outbound) ? $data->booking_internal_flight_outbound : '',
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
$form['passport-details']['booking_internal_flight_inbound'] = array(
|
|
|
|
|
|
|
|
'#type' => 'textfield',
|
|
|
|
|
|
|
|
'#title' => t('Internal flight details returning to conference'),
|
|
|
|
|
|
|
|
'#maxlength' => 120,
|
|
|
|
|
|
|
|
'#required' => FALSE,
|
|
|
|
|
|
|
|
'#default_value' => !empty($data->booking_internal_flight_inbound) ? $data->booking_internal_flight_inbound : '',
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@@ -949,6 +970,7 @@ function booking_form_submit($form, &$form_state) {
|
|
|
|
$node->booking_passport_issue_name = empty($values['booking_passport_issue_name']) ? '' : $values['booking_passport_issue_name'];
|
|
|
|
$node->booking_passport_issue_name = empty($values['booking_passport_issue_name']) ? '' : $values['booking_passport_issue_name'];
|
|
|
|
$node->booking_passport_expiry_date = empty($values['booking_passport_expiry_date']) ? '0' : _datearray_to_ts($values['booking_passport_expiry_date']);
|
|
|
|
$node->booking_passport_expiry_date = empty($values['booking_passport_expiry_date']) ? '0' : _datearray_to_ts($values['booking_passport_expiry_date']);
|
|
|
|
$node->booking_destination_country = empty($values['booking_destination_country']) ? '' : $values['booking_destination_country'];
|
|
|
|
$node->booking_destination_country = empty($values['booking_destination_country']) ? '' : $values['booking_destination_country'];
|
|
|
|
|
|
|
|
$node->booking_travel_insurance = empty($values['booking_travel_insurance']) ? '' : $values['booking_travel_insurance'];
|
|
|
|
|
|
|
|
|
|
|
|
//payment details
|
|
|
|
//payment details
|
|
|
|
$node->booking_payment_id = $values['booking_payment_id'];
|
|
|
|
$node->booking_payment_id = $values['booking_payment_id'];
|
|
|
@@ -1081,14 +1103,20 @@ function booking_load_query($node_ids = NULL, $fetchAssoc = FALSE)
|
|
|
|
global $event;
|
|
|
|
global $event;
|
|
|
|
$studygroup_count = variable_get('booking_studygroup_count','0');
|
|
|
|
$studygroup_count = variable_get('booking_studygroup_count','0');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: only add room info if the feature is enabled
|
|
|
|
|
|
|
|
|
|
|
|
$query = db_select('booking_person', 'p');
|
|
|
|
$query = db_select('booking_person', 'p');
|
|
|
|
//add price info
|
|
|
|
//add price info
|
|
|
|
$query->join('booking_price', 'pr', 'p.booking_payment_id = pr.pid');
|
|
|
|
$query->join('booking_price', 'pr', 'p.booking_payment_id = pr.pid');
|
|
|
|
//add travel form info if it exists
|
|
|
|
//add travel form info if it exists
|
|
|
|
$query->leftJoin('booking_travel', 't', 'p.nid = t.booking_person_nid');
|
|
|
|
$query->leftJoin('booking_travel', 't', 'p.nid = t.booking_person_nid');
|
|
|
|
//add room info
|
|
|
|
|
|
|
|
$query->leftJoin('booking_room_mapping', 'rm', 'p.nid = rm.booking_nodeid');
|
|
|
|
//add the joins for room allocation info if enabled
|
|
|
|
$query->leftJoin('booking_room_definition', 'r', 'rm.booking_roomid = r.rid');
|
|
|
|
if (variable_get('booking_enable_roomallocations', 0) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$query->leftJoin('booking_room_mapping', 'rm', 'p.nid = rm.booking_nodeid');
|
|
|
|
|
|
|
|
$query->leftJoin('booking_room_definition', 'r', 'rm.booking_roomid = r.rid');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//add the joins to flatten out study groups into columns
|
|
|
|
//add the joins to flatten out study groups into columns
|
|
|
|
if (variable_get('booking_enable_studygroups', 0) == 1)
|
|
|
|
if (variable_get('booking_enable_studygroups', 0) == 1)
|
|
|
@@ -1113,9 +1141,13 @@ function booking_load_query($node_ids = NULL, $fetchAssoc = FALSE)
|
|
|
|
//add the database fields we always want to retrieve
|
|
|
|
//add the database fields we always want to retrieve
|
|
|
|
$query->fields('p')
|
|
|
|
$query->fields('p')
|
|
|
|
->fields('t')
|
|
|
|
->fields('t')
|
|
|
|
->fields('pr', array('booking_price', 'booking_price_descrip','booking_late_price'))
|
|
|
|
->fields('pr', array('booking_price', 'booking_price_descrip','booking_late_price'));
|
|
|
|
->fields('rm', array('booking_room_bedtype'))
|
|
|
|
|
|
|
|
->fields('r', array('rid', 'booking_room_location_id', 'booking_room_number'));
|
|
|
|
if (variable_get('booking_enable_roomallocations', 0) == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$query->fields('rm', array('booking_room_bedtype'))
|
|
|
|
|
|
|
|
->fields('r', array('rid', 'booking_room_location_id', 'booking_room_number'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//now add the study group fields if applicable
|
|
|
|
//now add the study group fields if applicable
|
|
|
|
if (variable_get('booking_enable_studygroups', 0) == 1)
|
|
|
|
if (variable_get('booking_enable_studygroups', 0) == 1)
|
|
|
@@ -1185,6 +1217,9 @@ function _booking_insert($node) {
|
|
|
|
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
|
|
|
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
|
|
|
'booking_passport_expiry_date' => $node->booking_passport_expiry_date,
|
|
|
|
'booking_passport_expiry_date' => $node->booking_passport_expiry_date,
|
|
|
|
'booking_destination_country' => $node->booking_destination_country,
|
|
|
|
'booking_destination_country' => $node->booking_destination_country,
|
|
|
|
|
|
|
|
'booking_travel_insurance' => $node->booking_travel_insurance,
|
|
|
|
|
|
|
|
'booking_internal_flight_outbound' => $node->booking_internal_flight_outbound,
|
|
|
|
|
|
|
|
'booking_internal_flight_inbound' => $node->booking_internal_flight_inbound,
|
|
|
|
'booking_gender' => $node->booking_gender,
|
|
|
|
'booking_gender' => $node->booking_gender,
|
|
|
|
'booking_street' => $node->booking_street,
|
|
|
|
'booking_street' => $node->booking_street,
|
|
|
|
'booking_suburb' => $node->booking_suburb,
|
|
|
|
'booking_suburb' => $node->booking_suburb,
|
|
|
@@ -1272,6 +1307,9 @@ function _booking_update($node) {
|
|
|
|
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
|
|
|
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
|
|
|
'booking_passport_expiry_date' => _date_to_ts($node->booking_passport_expiry_date),
|
|
|
|
'booking_passport_expiry_date' => _date_to_ts($node->booking_passport_expiry_date),
|
|
|
|
'booking_destination_country' => $node->booking_destination_country,
|
|
|
|
'booking_destination_country' => $node->booking_destination_country,
|
|
|
|
|
|
|
|
'booking_travel_insurance' => $node->booking_travel_insurance,
|
|
|
|
|
|
|
|
'booking_internal_flight_outbound' => $node->booking_internal_flight_outbound,
|
|
|
|
|
|
|
|
'booking_internal_flight_inbound' => $node->booking_internal_flight_inbound,
|
|
|
|
'booking_gender' => $node->booking_gender,
|
|
|
|
'booking_gender' => $node->booking_gender,
|
|
|
|
'booking_street' => $node->booking_street,
|
|
|
|
'booking_street' => $node->booking_street,
|
|
|
|
'booking_suburb' => $node->booking_suburb,
|
|
|
|
'booking_suburb' => $node->booking_suburb,
|
|
|
@@ -1633,6 +1671,9 @@ function booking_view($node, $view_mode) {
|
|
|
|
$rows[] = array(t('Passport Exact Issued Name:'), $node->booking_passport_issue_name);
|
|
|
|
$rows[] = array(t('Passport Exact Issued Name:'), $node->booking_passport_issue_name);
|
|
|
|
$rows[] = array(t('Passport Issue Location:'), $node->booking_passport_issue_location);
|
|
|
|
$rows[] = array(t('Passport Issue Location:'), $node->booking_passport_issue_location);
|
|
|
|
$rows[] = array(t('Destination Country:'), $node->booking_destination_country);
|
|
|
|
$rows[] = array(t('Destination Country:'), $node->booking_destination_country);
|
|
|
|
|
|
|
|
$rows[] = array(t('Travel Insurance details:'), $node->booking_travel_insurance);
|
|
|
|
|
|
|
|
$rows[] = array(t('Internal Flight Outbound:'), $node->booking_internal_flight_outbound);
|
|
|
|
|
|
|
|
$rows[] = array(t('Internal Flight Returning:'), $node->booking_internal_flight_inbound);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$rows[] = array(t('Payment Type Selected:'), t('!amount_paid', array('!amount_paid' => $payment_type)));
|
|
|
|
$rows[] = array(t('Payment Type Selected:'), t('!amount_paid', array('!amount_paid' => $payment_type)));
|
|
|
|