Added logging to travel form
This commit is contained in:
@@ -311,7 +311,8 @@ function travel_form_validate($form, &$form_state) {
|
||||
form_set_error('booking_bf_gf_nid',
|
||||
t('You have entered an invalid registration id for your boyfriend/girlfriend. Please ensure you are using only the registration reference number your boyfriend/girlfriend received via email. If you believe this to be incorrect, please !contact using the details provided.',
|
||||
array('!contact' => l('contact us', 'contact')))
|
||||
);
|
||||
);
|
||||
watchdog('booking', "<pre>Travel form non-numeric bf/gf\n@info</pre>", array('@info' => print_r( $form_state['values'], true)));
|
||||
}
|
||||
|
||||
//don't allow them to specify their own node id
|
||||
@@ -319,7 +320,8 @@ function travel_form_validate($form, &$form_state) {
|
||||
{
|
||||
form_set_error('booking_bf_gf_nid',
|
||||
t('You have entered your own registration id. Please ensure you enter only the registration reference number your boyfriend/girlfriend received via email when registering, not your own registration id.')
|
||||
);
|
||||
);
|
||||
watchdog('booking', "<pre>Travel form bf/gf same as person id\n@info</pre>", array('@info' => print_r( $form_state['values'], true)));
|
||||
}
|
||||
|
||||
//check that the partner exists
|
||||
@@ -333,7 +335,8 @@ function travel_form_validate($form, &$form_state) {
|
||||
form_set_error('booking_bf_gf_nid',
|
||||
t('We cannot find a matching registration id for your boyfriend/girlfriend. Please ensure you are using only the number that relates to their registration. If you believe this to be incorrect, please !contact using the details provided.',
|
||||
array('!contact' => l('contact us', 'contact')))
|
||||
);
|
||||
);
|
||||
watchdog('booking', "<pre>Travel form unknown bf/gf id\n@info</pre>", array('@info' => print_r( $form_state['values'], true)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +347,9 @@ function travel_form_validate($form, &$form_state) {
|
||||
{
|
||||
form_set_error('booking_flightnum_inbound',
|
||||
t('Please enter the flight number associated with your arrival flight.')
|
||||
);
|
||||
);
|
||||
watchdog('booking', "<pre>Travel form missing flight number for arrival flight\n@info</pre>",
|
||||
array('@info' => print_r( $form_state['values'], true)));
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -357,14 +362,17 @@ function travel_form_validate($form, &$form_state) {
|
||||
{
|
||||
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('@info' => print_r( $form_state['values'], true)));
|
||||
}
|
||||
|
||||
if ( (! isset($form_state['values']['booking_flightnum_outbound'])) || ($form_state['values']['booking_flightnum_outbound'] == '') )
|
||||
{
|
||||
form_set_error('booking_flightnum_outbound',
|
||||
t('Please enter the flight number associated with your departing flight.')
|
||||
);
|
||||
);
|
||||
watchdog('booking', "<pre>Travel form missing flight number for departing flight\n@info</pre>",
|
||||
array('@info' => print_r( $form_state['values'], true)));
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -377,7 +385,8 @@ function travel_form_validate($form, &$form_state) {
|
||||
{
|
||||
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('@info' => print_r( $form_state['values'], true)));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user