bugfixes
This commit is contained in:
@@ -400,9 +400,10 @@ function travel_form_validate($form, &$form_state)
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($form_state['values']['booking_flight_datetime_inbound']['day'] == '' || $form_state['values']['booking_flight_datetime_inbound']['month'] == '' || $form_state['values']['booking_flight_datetime_inbound']['year'] == '' || $form_state['values']['booking_flight_datetime_inbound']['hour'] == '' || $form_state['values']['booking_flight_datetime_inbound']['minute'] == '') {
|
//if ($form_state['values']['booking_flight_datetime_inbound']['day'] == '' || $form_state['values']['booking_flight_datetime_inbound']['month'] == '' || $form_state['values']['booking_flight_datetime_inbound']['year'] == '' || $form_state['values']['booking_flight_datetime_inbound']['hour'] == //'' || $form_state['values']['booking_flight_datetime_inbound']['minute'] == '') {
|
||||||
|
if (!isset($form_state['values']['booking_flight_datetime_inbound'])) {
|
||||||
form_set_error('booking_flight_datetime_inbound', t('Please enter the arrival time associated with your flight.'));
|
form_set_error('booking_flight_datetime_inbound', t('Please enter the arrival time associated with your flight.'));
|
||||||
watchdog('booking', "<pre>Travel form missing flight arrival time\n@info</pre>", array(
|
watchdog('booking_debug', "<pre>Travel form missing flight arrival time\n@info</pre>", array(
|
||||||
'@info' => print_r($form_state['values'], true)
|
'@info' => print_r($form_state['values'], true)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -414,7 +415,7 @@ function travel_form_validate($form, &$form_state)
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($form_state['values']['booking_flight_datetime_outbound']['day'] == '' || $form_state['values']['booking_flight_datetime_outbound']['month'] == '' || $form_state['values']['booking_flight_datetime_outbound']['year'] == '' || $form_state['values']['booking_flight_datetime_outbound']['hour'] == '' || $form_state['values']['booking_flight_datetime_outbound']['minute'] == '') {
|
if (!isset($form_state['values']['booking_flight_datetime_outbound'])) {
|
||||||
form_set_error('booking_flight_datetime_outbound', t('Please enter the departure time associated with your flight.'));
|
form_set_error('booking_flight_datetime_outbound', t('Please enter the departure time associated with your flight.'));
|
||||||
watchdog('booking', "<pre>Travel form missing flight departure time\n@info</pre>", array(
|
watchdog('booking', "<pre>Travel form missing flight departure time\n@info</pre>", array(
|
||||||
'@info' => print_r($form_state['values'], true)
|
'@info' => print_r($form_state['values'], true)
|
||||||
@@ -430,8 +431,7 @@ function travel_form_validate($form, &$form_state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} //end check for flying
|
} //end check for flying
|
||||||
|
} //end validation
|
||||||
}
|
|
||||||
|
|
||||||
function travel_form_submit($form, &$form_state)
|
function travel_form_submit($form, &$form_state)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user