array( 'message' => $response['ConfirmMessage'], ), ), ); } } /** * After submitting an ILL request patrons will be redirected to the content returned from this function. * @return string * a string of HTML to display including the results of the ILL request and some boilerplate text. */ 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 = "
"; return " ' . $std_message; } /** * The patron portion of the ILL form. * * The campus_id and email portion are also used in a request for an Relais aid. * * @param array $form * An array representing a Drupal form. * @param array $form_state * An array containing the Drupal form state. * * @return array * An array representing the bibliographic form. */ function upei_roblib_ill_auth_form($form, &$form_state) { module_load_include('inc', 'upei_roblib_ill', 'includes/utilities'); $form['#prefix'] = upei_roblib_format_biblio_info($form_state); $form['FirstName'] = array( '#type' => 'textfield', '#title' => t('Your First Name'), '#size' => 50, '#required' => TRUE, ); $form['Surname'] = array( '#type' => 'textfield', '#title' => t('Your Last Name'), '#size' => 50, '#required' => TRUE, ); $form['campus_id'] = array( '#type' => 'textfield', '#title' => t('Your Campus ID'), '#size' => 50, '#required' => TRUE, ); $patron_types = array( 'None' => t('None'), 'UPEI Faculty/Staff' => t('UPEI Faculty/Staff'), 'UPEI Graduate Student' => t('UPEI Graduate Student'), 'UPEI Undergraduate Student' => t('UPEI Undergraduate Student'), 'UPEI Honours Undergraduate Student' => t('UPEI Honours Undergraduate Student'), 'UPEI Alumni Premiere member' => t('UPEI Alumni Premiere member'), 'UPEI Alumni member' => t('UPEI Alumni member'), 'Public Borrower' => t('Public Borrower'), ); $departments = array( 'Applied Human Sciences' => t('Applied Human Sciences'), 'AVC - Biomedical Sciences' => t('AVC - Biomedical Sciences'), 'AVC - Companion Animals' => t('AVC - Companion Animals'), 'AVC - Health Management' => t('AVC - Health Management'), 'AVC - Pathology/Microbiology' => t('AVC - Pathology/Microbiology'), 'AVC - Lobster Science' => t('AVC - Lobster Science'), 'Biology' => t('Biology'), 'Business' => t('Business'), 'Chemistry' => t('Chemistry'), 'Classics' => t('Classics'), 'Diversity and Social Justice Studies' => t('Diversity and Social Justice Studies'), 'Economics' => t('Economics'), 'Education' => t('Education'), 'English' => t('English'), 'Engineering' => t('Engineering'), 'Environmental Studies' => t('Environmental Studies'), 'Fine Arts' => t('Fine Arts'), 'History' => t('History'), 'Island Studies' => t('Island Studies'), 'Island Studies (Masters)' => t('Island Studies (Masters)'), 'Robertson Library' => t('Robertson Library'), 'Robertson Library' => t('Robertson Library'), 'Mathematical and Computational Sciences' => t('Mathematical and Computational Sciences'), 'Modern Languages' => t('Modern Languages'), 'Music' => t('Music'), 'Nursing' => t('Nursing'), 'Philosophy' => t('Philosophy'), 'Physics' => t('Physics'), 'Political Science' => t('Political Science'), 'Psychology' => t('Psychology'), 'Religious Studies' => t('Religious Studies'), 'Sociology/Anthropology' => t('Sociology/Anthropology'), 'Other' => t('Other (Please add to the Notes field)'), ); $form['patron_type'] = array( '#type' => 'select', '#title' => t('Your Patron Type'), '#options' => $patron_types, '#required' => TRUE, ); $form['Department'] = array( '#type' => 'select', '#title' => t('Your Department'), '#options' => $departments, '#required' => TRUE, ); /*$form['DeliveryAddress'] = array( '#type' => 'textfield', '#title' => t('Your Email'), '#size' => 50, '#required' => TRUE, ); */ $form['InstitutionName'] = array( '#type' => 'hidden', '#title' => t('Name of Institution'), '#size' => 50, '#default_value' => 'University of Prince Edward Island', '#required' => TRUE, ); $form['LibraryName'] = array( '#type' => 'hidden', '#title' => t('Name of Library'), '#size' => 50, '#default_value' => 'Robertson Library', '#required' => TRUE, ); $form['notes'] = array( '#type' => 'textarea', '#title' => t('Notes'), '#size' => 50, '#required' => FALSE, ); $form['certify'] = array( '#type' => 'checkbox', '#description' => 'I hereby certify that this item is being sought for a fair dealing purpose and any copying will be in accordance with the Copyright Act. ', '#size' => 50, '#required' => TRUE, ); $form['submit'] = array( '#type' => 'submit', '#value' => 'Submit', ); return $form; } /** * The bibliographic portion of the ILL form. * * @param array $form * An array representing a Drupal form. * @param array $form_state * An array containing the Drupal form state. * * @return array * An array representing the bibliographic form. */ function upei_roblib_ill_request_form($form, &$form_state) { module_load_include('inc', 'upei_roblib_ill', 'includes/utilities'); $form['#prefix'] = '