Browse Source

made the ILL header/warning message a config textarea

9.x-1.0
ppound 4 years ago
parent
commit
5bb37c50ab
  1. 7
      includes/admin.form.inc
  2. 9
      includes/form.inc
  3. 1
      upei_roblib_ill.install

7
includes/admin.form.inc

@ -66,6 +66,13 @@ function upei_roblib_ill_admin_form($form, &$form_state) {
'#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'),
];
$form['upei_roblib_ill_header_message'] = [
'#required' => TRUE,
'#type' => 'textarea',
'#title' => t('ILL Header Message'),
'#description' => t('The message that appears at the top of the ILL form, recently used for Covid messages. Leave this blank for no message to appear at the top of the form.'),
'#default_value' => variable_get('upei_roblib_ill_header_message', ''),
];
return system_settings_form($form);

9
includes/form.inc

@ -331,8 +331,13 @@ Freedom of Information and Protection of Privacy Act and will be protected
*/
function upei_roblib_ill_request_form($form, &$form_state) {
module_load_include('inc', 'upei_roblib_ill', 'includes/utilities');
$emergency_message = '<div class="messages messages--error closure-notice">
Due to the current Covid-19 restrictions, many libraries across the country are unable to provide print books or other "returnables." UPEI patrons and other libraries are able to submit requests and we will do our best to locate/provide a print copy, however, there may be delays with staff having limited access to their campuses and the need for books to be quarantined upon arrival. Note that ebooks cannot be "borrowed" through ILL -- not just now but at any time -- due to publisher restrictions. Libraries must purchase ebooks in order to access them. We are able to provide ebook chapters, e-journal articles, etc. Scan on Demand (Scanning from our books or print journals) also resumed as of May 25. Simply choose the appropriate form (Book Chapter or Journal Article) from the drop-down menu associated with "Item Type". The <strong>process for retrieving requested journal articles or book chapters has changed</strong> as of December 15, 2020. </div>';
$header_message = variable_get('upei_roblib_ill_header_message', '');
$emergency_message = '';
if(!empty($header_message)) {
$emergency_message = '<div class="messages messages--error closure-notice">';
$emergency_message .= $header_message;
$emergency_message .= '</div>';
}
$form['#prefix'] = $emergency_message . '<div id="upei-roblib-ill-request-form">';
$form['#suffix'] = '<div class="roblib-required">* = Required Field</div></div>';
$type = upei_roblib_ill_get_request_variable('genre');

1
upei_roblib_ill.install

@ -16,6 +16,7 @@ function upei_roblib_ill_uninstall() {
'upei_roblib_ill_library_symbol',
'upei_roblib_ill_contact_email',
'upei_roblib_ill_contact_phonel',
'upei_roblib_ill_header_message',
];
array_walk($variables, 'variable_del');
}

Loading…
Cancel
Save