Added destination country and updated import data functions
This commit is contained in:
@@ -149,7 +149,7 @@ 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_status'] = array(
|
||||
'#type' => 'radios',
|
||||
'#type' => 'select',
|
||||
'#title' => t('Registration Status'),
|
||||
'#options' => _booking_status_generate(),
|
||||
'#default_value' => !empty($data->booking_status) ? $data->booking_status : '',
|
||||
@@ -389,7 +389,17 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
||||
'#date_format' => 'd/m/Y',
|
||||
//'#date_label_position' => 'within',
|
||||
'#date_year_range' => '+0:+13'
|
||||
);
|
||||
);
|
||||
if ($inserting == FALSE)
|
||||
{
|
||||
$form['passport-details']['booking_destination_country'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Which country is this person going to?'),
|
||||
'#maxlength' => 120,
|
||||
'#required' => FALSE,
|
||||
'#default_value' => !empty($data->booking_destination_country) ? $data->booking_destination_country : '',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$form['contact-details'] = array(
|
||||
@@ -930,6 +940,7 @@ function booking_form_submit($form, &$form_state) {
|
||||
$node->booking_passport_issue_location = empty($values['booking_passport_issue_location']) ? '' : $values['booking_passport_issue_location'];
|
||||
$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_destination_country = empty($values['booking_destination_country']) ? '' : $values['booking_destination_country'];
|
||||
|
||||
//payment details
|
||||
$node->booking_payment_id = $values['booking_payment_id'];
|
||||
@@ -1161,6 +1172,7 @@ function _booking_insert($node) {
|
||||
'booking_passport_issue_location' => $node->booking_passport_issue_location,
|
||||
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
||||
'booking_passport_expiry_date' => $node->booking_passport_expiry_date,
|
||||
'booking_destination_country' => $node->booking_destination_country,
|
||||
'booking_gender' => $node->booking_gender,
|
||||
'booking_street' => $node->booking_street,
|
||||
'booking_suburb' => $node->booking_suburb,
|
||||
@@ -1244,7 +1256,8 @@ function _booking_update($node) {
|
||||
'booking_passport_num' => $node->booking_passport_num,
|
||||
'booking_passport_issue_location' => $node->booking_passport_issue_location,
|
||||
'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_gender' => $node->booking_gender,
|
||||
'booking_street' => $node->booking_street,
|
||||
'booking_suburb' => $node->booking_suburb,
|
||||
@@ -1605,6 +1618,7 @@ function booking_view($node, $view_mode) {
|
||||
$rows[] = array(t('Passport Expiry:'), t('!timestamp', array('!timestamp' => _booking_convert_ts($node->booking_passport_expiry_date)->format('d/m/Y'))));
|
||||
$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('Destination Country:'), $node->booking_destination_country);
|
||||
}
|
||||
|
||||
$rows[] = array(t('Payment Type Selected:'), t('!amount_paid', array('!amount_paid' => $payment_type)));
|
||||
@@ -1689,6 +1703,7 @@ function booking_view($node, $view_mode) {
|
||||
$rows[] = array(t('Previous Mission Experience:'), $node->booking_mission_experience_details);
|
||||
}
|
||||
$rows[] = array(t('Temporary UUID:'), $node->booking_tempid);
|
||||
$rows[] = array(t('Lanyard lucky number:'), $node->booking_luckynum);
|
||||
|
||||
//display room allocation data if enabled
|
||||
if (variable_get('booking_enable_roomallocations', 0) == 1)
|
||||
|
Reference in New Issue
Block a user