diff --git a/includes/admin.form.inc b/includes/admin.form.inc index e6da6f8..9c6ae1e 100644 --- a/includes/admin.form.inc +++ b/includes/admin.form.inc @@ -50,6 +50,23 @@ function upei_roblib_ill_admin_form($form, &$form_state) { '#description' => t('An identifier to call yourself, for the OpenURL endpoint. To use this service you first need to register for an account here: http://www.crossref.org/requestaccount/'), '#default_value' => variable_get('upei_roblib_ill_doi_openurl_pid'), ); + $form['upei_roblib_ill_contact_email'] = array( + '#required' => TRUE, + '#type' => 'textfield', + '#size' => 200, + '#title' => t('Contact Email'), + '#description' => t('The email address we want to show after a user has submitted an ILL request'), + '#default_value' => variable_get('upei_roblib_ill_contact_email', 'ill@upei.ca'), + ); + $form['upei_roblib_ill_contact_phone'] = array( + '#required' => TRUE, + '#type' => 'textfield', + '#size' => 200, + '#title' => t('Contact Phone Number'), + '#description' => t('The phone number we want to show to the user after a user has submitted an ILL request'), + '#default_value' => variable_get('upei_roblib_ill_contact_phone', '902-566-0445'), + ); + return system_settings_form($form); diff --git a/includes/form.inc b/includes/form.inc index 0b71066..9e07d29 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -108,12 +108,13 @@ function upei_roblib_ill_form_submit($form, &$form_state) { * a string of HTML to display including the results of the ILL request and some boilerplate text. */ function upei_roblib_ill_form_redirect() { - //TODO phone number, email etc. could be variables read from the database. + $contact_email = variable_get('upei_roblib_ill_contact_email', 'ill@upei.ca'); + $contact_phone_number = variable_get('upei_roblib_ill_contact_phone', '902-566-0445'); $librarian_link = l(t('subject-specific'), 'http://library.upei.ca/librarians', array('html' => TRUE)); $help_message = t("We can help! Please contact your !librarian_link librarian if you'd like help finding more resources relating to your topic.", array('!librarian_link' => $librarian_link)); - $standard_message = t("To contact the department about this request, you can send a message to ill@upei.ca or -call 902-566-0445."); + $standard_message = t("To contact the department about this request, you can send a message to @email or +call @phone.", array('@phone' => $contact_phone_number, '@email' => $contact_email)); if (isset($_GET['error']) && $_GET['error'] === 'FALSE') { $standard_message = t("A message including the Request ID has been sent to @email. ", array( '@email' => $_GET['email'], diff --git a/upei_roblib_ill.install b/upei_roblib_ill.install index 120c9c2..fe91107 100644 --- a/upei_roblib_ill.install +++ b/upei_roblib_ill.install @@ -14,6 +14,8 @@ function upei_roblib_ill_uninstall() { 'upei_roblib_ill_auth_url', 'upei_roblib_ill_relais_key', 'upei_roblib_ill_library_symbol', + 'upei_roblib_ill_contact_email', + 'upei_roblib_ill_contact_phonel', ); array_walk($variables, 'variable_del'); }