From 4a9d1a7b9d559b1520ce8e53ec5a751a67236921 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Tue, 23 May 2017 16:21:33 -0300 Subject: [PATCH] added email to output message --- includes/form.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/form.inc b/includes/form.inc index 9f37d9c..9d2e87a 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -80,11 +80,18 @@ function upei_roblib_ill_form_submit($form, &$form_state) { case 'upei_roblib_ill_auth_form': //process the form $response = upei_roblib_ill_add_request($form_state, $form_state['storage']['aid']); + if(!isset($response['RequestNumber'])) { + $error = 'FALSE'; + } else { + $error = 'TRUE'; + } $form_state['redirect'] = array( 'upei/roblib/ill/finished', array( 'query' => array( 'message' => $response['ConfirmMessage'], + 'email' => $form_state['values']['DeliveryAddress'], + 'error' => $error, ), ), ); @@ -100,7 +107,7 @@ function upei_roblib_ill_form_submit($form, &$form_state) { function upei_roblib_ill_form_redirect() { //TODO turn this into a drupal render array //TODO phone number, email etc. could be variables read from the database. - $std_message = "
A message including the Request ID has been sent to your UPEI email address.
To contact the department about this request, you can send a message to ill@upei.ca or + $std_message = "
To contact the department about this request, you can send a message to ill@upei.ca or call 902-566-0445
"; return "
" . $_GET['message'] . '
' . $std_message; }