Many changes...
This commit is contained in:
@@ -117,6 +117,15 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
||||
'#required' => TRUE,
|
||||
'#default_value' => !empty($data->booking_lastname) ? $data->booking_lastname : ''
|
||||
);
|
||||
|
||||
$form['your-details']['booking_gender'] = array(
|
||||
'#type' => 'select',
|
||||
'#title' => t('Gender'),
|
||||
'#required' => TRUE,
|
||||
'#default_value' => variable_get('booking_gender', empty($data->booking_gender) ? variable_get('booking_default_gender') : $data->booking_gender),
|
||||
'#options' => _booking_gender_options(),
|
||||
);
|
||||
/*
|
||||
$form['your-details']['booking_gender'] = array(
|
||||
'#type' => 'select',
|
||||
'#title' => t('Gender'),
|
||||
@@ -127,7 +136,7 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
||||
'F' => 'Female',
|
||||
),
|
||||
);
|
||||
|
||||
*/
|
||||
//If we're loading this from an existing node, we need to convert the timestamp into the proper format
|
||||
$form['your-details']['booking_dob'] = array(
|
||||
'#type' => 'date_select',
|
||||
@@ -1820,18 +1829,22 @@ function booking_view($node, $view_mode) {
|
||||
$flight_rows[] = array(t('Internal Flight Booking Reference:'), $node->booking_outflight_bookingnum);
|
||||
$flight_rows[] = array(t('Internal Flight Number:'), $node->booking_outflight_flightnum);
|
||||
$flight_rows[] = array(t('Internal Flight Origin to Destination:'), $node->booking_outflight_origin);
|
||||
$flight_rows[] = array(t('Internal Flight Departure Time:'), format_date($node->booking_outflight_origin_ts, 'custom', 'd/m/Y H:i') );
|
||||
$flight_rows[] = array(t('Internal Flight Departure Time:'),
|
||||
$node->booking_outflight_origin_ts == 0 ? '' : format_date($node->booking_outflight_origin_ts, 'custom', 'd/m/Y H:i') );
|
||||
$flight_rows[] = array(t('Connecting Flight Number:'), $node->booking_outflight_connecting_flightnum);
|
||||
$flight_rows[] = array(t('Connecting Flight Origin to Destination:'), $node->booking_outflight_destination);
|
||||
$flight_rows[] = array(t('Internal Flight Arrival Time:'), format_date($node->booking_outflight_destination_ts, 'custom', 'd/m/Y H:i') );
|
||||
$flight_rows[] = array(t('Internal Flight Arrival Time:'),
|
||||
$node->booking_outflight_destination_ts == 0 ? '' : format_date($node->booking_outflight_destination_ts, 'custom', 'd/m/Y H:i') );
|
||||
//return flight
|
||||
$flight_rows[] = array(t('Return Internal Flight Booking Reference:'), $node->booking_rtrnflight_bookingnum);
|
||||
$flight_rows[] = array(t('Return Internal Flight Number:'), $node->booking_rtrnflight_flightnum);
|
||||
$flight_rows[] = array(t('Return Internal Flight Origin to Destination:'), $node->booking_rtrnflight_origin);
|
||||
$flight_rows[] = array(t('Return Internal Flight Departure Time:'), format_date($node->booking_rtrnflight_origin_ts, 'custom', 'd/m/Y H:i') );
|
||||
$flight_rows[] = array(t('Return Internal Flight Departure Time:'),
|
||||
$node->booking_rtrnflight_origin_ts == 0 ? '' : format_date($node->booking_rtrnflight_origin_ts, 'custom', 'd/m/Y H:i') );
|
||||
$flight_rows[] = array(t('Connecting Flight Number:'), $node->booking_rtrnflight_connecting_flightnum);
|
||||
$flight_rows[] = array(t('Connecting Flight Origin to Destination:'), $node->booking_rtrnflight_destination);
|
||||
$flight_rows[] = array(t('Return Internal Flight Arrival Time:'), format_date($node->booking_rtrnflight_destination_ts, 'custom', 'd/m/Y H:i') );
|
||||
$flight_rows[] = array(t('Return Internal Flight Arrival Time:'),
|
||||
$node->booking_rtrnflight_destination_ts == 0 ? '' : format_date($node->booking_rtrnflight_destination_ts, 'custom', 'd/m/Y H:i') );
|
||||
|
||||
//add the flight info to a new section
|
||||
$flight_heading = t("<h2>Internal Flight Details</h2>");
|
||||
@@ -1841,7 +1854,7 @@ function booking_view($node, $view_mode) {
|
||||
);
|
||||
$node->content['flight-details'] = array(
|
||||
'#markup' => theme('table', array('header' => $header, 'rows' => $flight_rows)),
|
||||
'#weight' =>2,
|
||||
'#weight' => 3,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1942,12 +1955,12 @@ function booking_view($node, $view_mode) {
|
||||
|
||||
$node->content['room-heading'] = array(
|
||||
'#markup' => $room_heading,
|
||||
'#weight' => 2,
|
||||
'#weight' => 4,
|
||||
);
|
||||
|
||||
$node->content['room-details'] = array(
|
||||
'#markup' => theme('table', array('header' => $header, 'rows' => $room_rows)),
|
||||
'#weight' => 3,
|
||||
'#weight' => 5,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1971,12 +1984,12 @@ function booking_view($node, $view_mode) {
|
||||
|
||||
$node->content['travel-heading'] = array(
|
||||
'#markup' => $travel_heading,
|
||||
'#weight' => 4,
|
||||
'#weight' => 6,
|
||||
);
|
||||
|
||||
$node->content['travel-details'] = array(
|
||||
'#markup' => theme('table', array('header' => $header, 'rows' => $travel_rows)),
|
||||
'#weight' => 5,
|
||||
'#weight' => 7,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2006,12 +2019,12 @@ function booking_view($node, $view_mode) {
|
||||
|
||||
$node->content['group-heading'] = array(
|
||||
'#markup' => $studygroup_heading,
|
||||
'#weight' => 6,
|
||||
'#weight' => 8,
|
||||
);
|
||||
|
||||
$node->content['group-details'] = array(
|
||||
'#markup' => theme('table', array('header' => $header, 'rows' => $group_rows)),
|
||||
'#weight' => 7,
|
||||
'#weight' => 9,
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user