From 821de29ae36303239a29730a649232722d3878e8 Mon Sep 17 00:00:00 2001
From: Heike Reinken <reinken@ub.uni-leipzig.de>
Date: Thu, 28 May 2020 16:12:43 +0200
Subject: [PATCH] refs #17596 [master] correct headline structure * change <h2>
 to <h1> * Search History - Head title hierarchy depends on logging status now
 ** Dependent on the logging status and the existence of book bags there is a
 decision which hierarchy the related head titles will get

TODO: Revert when VF-core adapts this fix
---
 local/alpha/config/vufind/config.ini          | 14 ++-
 .../finc/templates/Helpers/ils-offline.phtml  | 11 +++
 themes/finc/templates/browse/home.phtml       | 91 +++++++++++++++++++
 themes/finc/templates/cart/cart.phtml         |  2 +-
 themes/finc/templates/cart/email.phtml        | 47 ++++++++++
 themes/finc/templates/cart/save.phtml         | 74 +++++++++++++++
 themes/finc/templates/channels/home.phtml     | 14 +++
 .../templates/librarycards/editcard.phtml     | 47 ++++++++++
 themes/finc/templates/myresearch/edit.phtml   | 67 ++++++++++++++
 .../finc/templates/myresearch/editlist.phtml  | 51 +++++++++++
 .../templates/myresearch/newpassword.phtml    | 43 +++++++++
 themes/finc/templates/record/addtag.phtml     | 28 ++++++
 themes/finc/templates/record/save.phtml       | 66 ++++++++++++++
 themes/finc/templates/search/history.phtml    | 15 ++-
 themes/finc/templates/search/newitem.phtml    | 43 +++++++++
 themes/finc/templates/search/reserves.phtml   | 60 ++++++++++++
 themes/finc/templates/search/results.phtml    |  1 +
 17 files changed, 670 insertions(+), 4 deletions(-)
 create mode 100644 themes/finc/templates/Helpers/ils-offline.phtml
 create mode 100644 themes/finc/templates/browse/home.phtml
 create mode 100644 themes/finc/templates/cart/email.phtml
 create mode 100644 themes/finc/templates/cart/save.phtml
 create mode 100644 themes/finc/templates/channels/home.phtml
 create mode 100644 themes/finc/templates/librarycards/editcard.phtml
 create mode 100644 themes/finc/templates/myresearch/edit.phtml
 create mode 100644 themes/finc/templates/myresearch/editlist.phtml
 create mode 100644 themes/finc/templates/myresearch/newpassword.phtml
 create mode 100644 themes/finc/templates/record/addtag.phtml
 create mode 100644 themes/finc/templates/record/save.phtml
 create mode 100644 themes/finc/templates/search/newitem.phtml
 create mode 100644 themes/finc/templates/search/reserves.phtml

diff --git a/local/alpha/config/vufind/config.ini b/local/alpha/config/vufind/config.ini
index 487f820c1de..15272827151 100644
--- a/local/alpha/config/vufind/config.ini
+++ b/local/alpha/config/vufind/config.ini
@@ -19,4 +19,16 @@ relative_path = ../../../config/vufind/config.ini
 ;       Add ALPHA-specific customization after this header.
 ;
 ;##################### DO NOT DELETE THIS HEADER ####################
-;####################################################################
\ No newline at end of file
+;####################################################################
+
+[Catalog]
+library_cards=true
+[Site]
+showBookBag=true
+[Browse]
+tag=true
+[Social]
+tags=enabled
+max_tag_length=64
+case_sensitive_tags=false
+show_solr_options_in_tag_search=true
diff --git a/themes/finc/templates/Helpers/ils-offline.phtml b/themes/finc/templates/Helpers/ils-offline.phtml
new file mode 100644
index 00000000000..3183b2e28d2
--- /dev/null
+++ b/themes/finc/templates/Helpers/ils-offline.phtml
@@ -0,0 +1,11 @@
+<!-- finc - templates - Helpers - ils-offline -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<div class="alert alert-warning">
+  <h1><?=$this->transEsc('ils_offline_title')?></h1>
+  <p><strong><?=$this->transEsc('ils_offline_status')?></strong></p>
+  <p><?=$this->transEsc($this->offlineModeMsg)?></p>
+  <?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
+  <p><a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a></p>
+</div>
+<!-- finc - templates - Helpers - ils-offline - END -->
diff --git a/themes/finc/templates/browse/home.phtml b/themes/finc/templates/browse/home.phtml
new file mode 100644
index 00000000000..13445e78c6d
--- /dev/null
+++ b/themes/finc/templates/browse/home.phtml
@@ -0,0 +1,91 @@
+<!-- finc - templates - browse - home -->
+<?php /* copied from bootstrap3 - added h1 for sr-only - #17596 - HR */?>
+
+<?php
+  $this->headTitle($this->translate('Browse the Catalog'));
+  $this->layout()->breadcrumbs = '<a href="' . $this->url('browse-home') . '">' . $this->transEsc('Browse') . '</a>';
+
+  $BROWSE_BASE = $this->url('browse-' . strtolower($this->currentAction));
+  $SEARCH_BASE = $this->url($this->currentAction == 'Tag' ? 'tag-home' : 'search-results');
+?>
+
+<h1 class="sr-only"><?=$this->transEsc('Browse the Catalog')?></h1>
+
+<?php if (!isset($this->currentAction)): ?>
+  <h2><?=$this->transEsc('Choose a Category to Begin Browsing') ?>:</h2>
+<?php endif; ?>
+
+<div class="browse-container">
+  <div class="browse-list<?php if (!empty($this->categoryList) || !empty($this->secondaryList)): ?> hidden-xs<?php endif ?>" id="list1">
+    <?php foreach ($this->browseOptions as $item => $currentOption): ?>
+      <a href="<?=$this->url('browse-' . strtolower($currentOption['action'])); ?>" class="browse-item<?php if($currentOption['action'] == $this->currentAction): ?> active<?php endif; ?>">
+        <?=$this->transEsc($currentOption['description']) ?>
+        <span class="pull-right flip"><i class="fa fa-angle-right" title="<?=$this->transEsc('more') ?>"></i></span>
+      </a>
+    <?php endforeach; ?>
+  </div>
+
+  <?php if (!empty($this->categoryList)): ?>
+    <div class="browse-list<?php if (!empty($this->secondaryList) || !empty($this->resultList)): ?> hidden-xs<?php endif ?>" id="list2">
+      <?php foreach($this->categoryList as $findby => $category): ?>
+        <a href="<?=$BROWSE_BASE ?>?findby=<?=urlencode($findby) ?>&amp;query_field=<?=$this->browse()->getSolrField($findby, $this->currentAction) ?>" class="browse-item<?php if (!is_string($category)): ?> with-badge<?php endif; ?><?php if ($this->findby == $findby): ?> active<?php endif; ?>">
+          <?php if(is_string($category)): ?>
+            <?=$this->transEsc($category)?>
+            <span class="pull-right flip"><i class="fa fa-angle-right" title="<?=$this->transEsc('more') ?>"></i></span>
+          <?php else: ?>
+            <?=$this->transEsc($category['text'])?>
+            <span class="badge"><?=number_format($category['count'])?></span>
+          <?php endif; ?>
+        </a>
+      <?php endforeach; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if (!empty($this->secondaryList)): ?>
+    <div class="browse-list<?php if (!empty($this->resultList)): ?> hidden-xs<?php endif ?>" id="list3">
+    <?php foreach($this->secondaryList as $secondary): ?>
+      <?php $url = $BROWSE_BASE . '?findby=' . urlencode($this->findby)
+          . '&amp;category=' . urlencode($this->category)
+          . '&amp;query=' . urlencode($secondary['value']);
+        if ($this->facetPrefix) {
+          $url .= '&amp;facet_prefix=' . urlencode($secondary['displayText']);
+        }
+        if ($this->secondaryParams) {
+          foreach($this->secondaryParams as $var => $val) {
+            $url .= '&amp;' . $var . '=' . urlencode($val);
+          }
+        }
+        $viewRecord = !empty($this->categoryList) && $this->currentAction != 'Tag' && $this->findby != 'alphabetical';
+        $hasBadge = $this->findby != 'alphabetical' && isset($secondary['count']);
+      ?>
+      <a href="<?=$url ?>" class="browse-item<?php if ($hasBadge): ?> with-badge<?php endif; ?><?php if ($this->query == $secondary['value'] . '' || $this->query == $secondary['value'] . '*'): ?> active<?php endif; ?>">
+        <?=$this->escapeHtml($secondary['displayText']) ?>
+        <?php if ($hasBadge): ?>
+          <span class="badge"><?=number_format($secondary['count']) ?></span>
+        <?php else: ?>
+          <span class="pull-right flip"><i class="fa fa-angle-right" title="<?=$this->transEsc('more') ?>"></i></span>
+        <?php endif; ?>
+      </a>
+      <?php if($viewRecord): ?>
+        <a class="browse-item view-record" href="<?=$SEARCH_BASE ?>?lookfor=<?php if ($this->filter): ?>&amp;filter[]=<?=urlencode($this->filter) ?>%3A<?=str_replace('+AND+', '&amp;filter[]=', urlencode($secondary['value'])) ?><?php endif; ?>&amp;filter[]=<?=$this->browse()->getSolrField($this->currentAction) ?>%3A[* TO *]<?php if($this->dewey_flag): ?>&amp;sort=dewey-sort<?php endif; ?>"><?=$this->transEsc('View Records') ?></a>
+      <?php endif; ?>
+    <?php endforeach; ?>
+    </div>
+  <?php endif; ?>
+
+  <?php if (!empty($this->resultList)): ?>
+    <div class="browse-list" id="list4">
+    <?php foreach($this->resultList as $result): ?>
+      <a class="browse-item with-badge" href="<?=$SEARCH_BASE ?>?<?=$this->paramTitle ?><?=urlencode($result['value']) ?><?php if ($this->searchParams): foreach($this->searchParams as $var => $val): ?>&amp;<?=$var ?>=<?=urlencode($val) ?><?php endforeach;endif; ?>">
+        <?=$this->escapeHtml($result['displayText'])?>
+        <span class="badge"><?=number_format($result['count']) ?></span>
+      </a>
+    <?php endforeach; ?>
+    </div>
+  <?php elseif (isset($this->query)): ?>
+    <div class="browse-list" id="list4">
+      <span class="browse-item"><?=$this->transEsc('nohit_heading') ?></span>
+    </div>
+  <?php endif; ?>
+</div>
+<!-- finc - templates - browse - home - END -->
diff --git a/themes/finc/templates/cart/cart.phtml b/themes/finc/templates/cart/cart.phtml
index 2382df0601b..1b20b669109 100644
--- a/themes/finc/templates/cart/cart.phtml
+++ b/themes/finc/templates/cart/cart.phtml
@@ -6,7 +6,7 @@
   // Set up breadcrumbs:
   $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ')
 ?>
-<h2><?=$this->transEsc('Book Bag') ?></h2>
+<h1><?=$this->transEsc('Book Bag') ?></h1>
 <?=$this->flashmessages()?>
 <?php /* finc: use .cart class to style content below */ ?>
 <form class="form-inline cart" action="<?=$this->url('cart-processor')?>" method="post"  name="cartForm" data-lightbox-onsubmit="cartFormHandler">
diff --git a/themes/finc/templates/cart/email.phtml b/themes/finc/templates/cart/email.phtml
new file mode 100644
index 00000000000..54d82cec86f
--- /dev/null
+++ b/themes/finc/templates/cart/email.phtml
@@ -0,0 +1,47 @@
+<!-- finc - templates - cart - email -->
+<?php /* copied from bootstrap3 - added h1 for sr-only - #17596 - HR */?>
+
+<?php
+  // Set page title.
+  $this->headTitle($this->translate('email_selected_favorites'));
+
+  // Set up breadcrumbs:
+  $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ')
+    . '<li><a href="' . $this->url('cart-home') . '">' . $this->transEsc('Cart') . '</a></li> '
+    . '<li class="active">' . $this->transEsc('email_selected_favorites') . '</li>';
+?>
+<h1 class="sr-only"><?=$this->transEsc('email_selected_favorites')?></h1>
+
+<h2><?=$this->transEsc('bookbag_email_selected') ?></h2>
+<?=$this->flashmessages()?>
+<form class="form-cart-email" action="<?=$this->url('cart-email')?>" method="post"  name="bulkEmail">
+  <?php foreach ($this->records as $current): ?>
+    <input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($current->getSourceIdentifier() . '|' . $current->getUniqueId())?>" />
+  <?php endforeach; ?>
+  <div class="form-group">
+    <label class="control-label"><?=$this->transEsc('Title')?>:</label>
+    <?php if(count($this->records) > 1): ?>
+      <button type="button" class="btn btn-default hidden" data-toggle="collapse" data-target="#itemhide">
+        <?=count($this->records) . ' ' . $this->transEsc('items') ?>
+      </button>
+      <div id="itemhide" class="collapse in">
+        <ul>
+          <?php foreach ($this->records as $current): ?>
+            <li><?=$this->escapeHtml($current->getBreadcrumb())?></li>
+          <?php endforeach; ?>
+        </ul>
+      </div>
+    <?php else: ?>
+      <p class="form-control-static"><?=$this->records[0]->getBreadcrumb() ?></p>
+    <?php endif; ?>
+  </div>
+  <?=$this->render('Helpers/email-form-fields.phtml')?>
+</form>
+<?php
+  $script = <<<JS
+    $('button.btn.hidden').removeClass('hidden');
+    $('#itemhide').removeClass('in');
+JS;
+?>
+<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET') ?>
+<!-- finc - templates - cart - email - END -->
diff --git a/themes/finc/templates/cart/save.phtml b/themes/finc/templates/cart/save.phtml
new file mode 100644
index 00000000000..92183fe7ae6
--- /dev/null
+++ b/themes/finc/templates/cart/save.phtml
@@ -0,0 +1,74 @@
+<!-- finc - templates - cart - save -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+    // Set page title.
+    $this->headTitle($this->translate('bookbag_save_selected'));
+
+    // Set up breadcrumbs:
+    $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ') .
+        '<li class="active">' . $this->transEsc('bookbag_save_selected') . '</li>';
+?>
+
+<h1><?=$this->transEsc('bookbag_save_selected')?></h1>
+
+<?=$this->flashmessages()?>
+
+<form class="form-cart-save" method="post" action="<?=$this->url('cart-save')?>" name="bulkSave">
+  <?php $idParams = []; ?>
+  <?php foreach ($this->records as $current): ?>
+    <?php $idParams[] = urlencode('ids[]') . '=' . urlencode($current->getSourceIdentifier() . '|' . $current->getUniqueId()) ?>
+    <input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($current->getSourceIdentifier() . '|' . $current->getUniqueId())?>" />
+  <?php endforeach; ?>
+  <div class="form-group">
+    <label class="control-label"><?=$this->transEsc('Title')?>:</label>
+    <?php if(count($this->records) > 1): ?>
+      <button type="button" class="btn btn-default hidden" data-toggle="collapse" data-target="#itemhide">
+        <?=count($this->records) . ' ' . $this->transEsc('items') ?>
+      </button>
+      <div id="itemhide" class="collapse in">
+        <ul>
+          <?php foreach ($this->records as $current): ?>
+            <li><?=$this->escapeHtml($current->getBreadcrumb())?></li>
+          <?php endforeach; ?>
+        </ul>
+      </div>
+    <?php else: ?>
+      <p class="form-control-static"><?=$this->records[0]->getBreadcrumb() ?></p>
+    <?php endif; ?>
+  </div>
+
+  <div class="form-group">
+    <label class="control-label" for="save_list"><?=$this->transEsc('Choose a List') ?></label>
+    <select id="save_list" name="list" class="form-control">
+      <?php if (count($this->lists) > 0): ?>
+        <?php foreach ($this->lists as $list): ?>
+          <option value="<?=$list['id'] ?>"<?php if ($list['id'] == $this->userlist()->lastUsed()): ?> selected="selected"<?php endif; ?>><?=$this->escapeHtml($list['title'])?></option>
+        <?php endforeach; ?>
+      <?php else: ?>
+        <option value=""><?=$this->transEsc('My Favorites') ?></option>
+      <?php endif; ?>
+    </select>
+    <a class="btn btn-link" id="make-list"  href="<?=$this->url('editList', ['id' => 'NEW']) . '?' . implode('&amp;', $idParams) ?>"><?=$this->transEsc('or create a new list'); ?></a>
+  </div>
+
+  <?php if ($this->usertags()->getMode() !== 'disabled'): ?>
+    <div class="form-group">
+      <label class="control-label" for="add_mytags"><?=$this->transEsc('Add Tags') ?></label>
+      <input id="add_mytags" type="text" name="mytags" value="" class="form-control"/>
+      <span class="help-block"><?=$this->transEsc("add_tag_note") ?></span>
+    </div>
+  <?php endif; ?>
+  <div class="form-group">
+    <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>"/>
+  </div>
+</form>
+
+<?php
+  $script = <<<JS
+  $('button.btn.hidden').removeClass('hidden');
+  $('#itemhide').removeClass('in');
+JS;
+?>
+<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET') ?>
+<!-- finc - templates - cart - save - END -->
diff --git a/themes/finc/templates/channels/home.phtml b/themes/finc/templates/channels/home.phtml
new file mode 100644
index 00000000000..5bf072cc53b
--- /dev/null
+++ b/themes/finc/templates/channels/home.phtml
@@ -0,0 +1,14 @@
+<!-- finc - templates - channels - home -->
+<?php /* copied from bootstrap3 - added h1 for sr-only - #17596 - HR */?>
+
+<?php
+    // Set up page title:
+    $this->headTitle($this->translate('Channels'));
+
+    // Set up breadcrumbs:
+    $this->layout()->breadcrumbs = '<li class="active">' . $this->transEsc('Channels') . '</li>';
+?>
+<h1 class="sr-only"><?=$this->transEsc('channel_explore')?></h1>
+
+<?=$this->render('channels/channelList.phtml')?>
+<!-- finc - templates - channels - home - END -->
diff --git a/themes/finc/templates/librarycards/editcard.phtml b/themes/finc/templates/librarycards/editcard.phtml
new file mode 100644
index 00000000000..680361fd6fe
--- /dev/null
+++ b/themes/finc/templates/librarycards/editcard.phtml
@@ -0,0 +1,47 @@
+<!-- finc - templates - librarycards - editcard -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+  // Set up page title:
+  $pageTitle = empty($this->card->id) ? 'Add a Library Card' : "Edit Library Card";
+  $this->headTitle($this->translate($pageTitle));
+
+  // Set up breadcrumbs:
+  $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>'
+    . '<li><a href="' . $this->url('librarycards-home') . '">' . $this->transEsc('Library Cards') . '</a></li>'
+    . '<li>' . $this->transEsc($pageTitle) . '</li>';
+?>
+
+<?=$this->flashmessages()?>
+
+<h1><?=$this->transEsc($pageTitle); ?></h1>
+
+<form class="form-edit-card" method="post" name="<?=empty($this->card->id) ? 'newCardForm' : 'editCardForm'?>" autocomplete="off">
+  <input type="hidden" name="id" value="<?=empty($this->card->id) ? 'NEW' : $this->card->id ?>"/>
+  <div class="form-group">
+    <label class="control-label" for="card_name"><?=$this->transEsc('Library Card Name'); ?>:</label>
+    <input id="card_name" class="form-control" type="text" name="card_name" value="<?=$this->escapeHtmlAttr($this->cardName)?>"/>
+  </div>
+  <?php if ($this->targets !== null): ?>
+  <div class="form-group">
+    <label class="control-label" for="login_target"><?=$this->transEsc('login_target')?>:</label>
+    <select id="login_target" name="target" class="form-control">
+      <?php foreach ($this->targets as $target): ?>
+        <option value="<?=$this->escapeHtmlAttr($target)?>"<?=($target == $this->target ? ' selected="selected"' : '')?>><?=$this->transEsc("source_$target", null, $target)?></option>
+      <?php endforeach; ?>
+    </select>
+  </div>
+  <?php endif; ?>
+  <div class="form-group">
+    <label class="control-label" for="login_username"><?=$this->transEsc('Username')?>:</label>
+    <input id="login_username" type="text" name="username" value="<?=$this->escapeHtmlAttr($this->username)?>" class="form-control"/>
+  </div>
+  <div class="form-group">
+    <label class="control-label" for="login_password"><?=$this->transEsc('Password')?>:</label>
+    <input id="login_password" type="password" name="password" value="" placeholder="<?=!empty($this->card->id) ? $this->escapeHtmlAttr($this->translate('library_card_edit_password_placeholder')) : ''?>" class="form-control"/>
+  </div>
+  <div class="form-group">
+    <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>"/>
+  </div>
+</form>
+<!-- finc - templates - librarycards - editcard - END -->
diff --git a/themes/finc/templates/myresearch/edit.phtml b/themes/finc/templates/myresearch/edit.phtml
new file mode 100644
index 00000000000..bb73f195631
--- /dev/null
+++ b/themes/finc/templates/myresearch/edit.phtml
@@ -0,0 +1,67 @@
+<!-- finc - templates - myresearch - edit -->
+<?php /* copied from bootstrap3 - added h1 for sr-only - #17596 - HR */?>
+
+<?php
+  // Set up page title:
+  $this->headTitle($this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb());
+
+  // Set up breadcrumbs:
+  $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Edit') . '</li>';
+?>
+<h1 class="sr-only"><?=$this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb()?></h1>
+
+<div class="record">
+  <h2><?=$this->escapeHtml($this->driver->getBreadcrumb())?></h2>
+
+  <form class="form-list-edit" method="post" name="editForm">
+  <?php if (empty($this->savedData)): ?>
+    <p class="alert alert-info">
+      <?php if (isset($listFilter)): ?>
+        <?=$this->transEsc('The record you selected is not part of the selected list.') ?>
+      <?php else: ?>
+        <?=$this->transEsc('The record you selected is not part of any of your lists.') ?>
+      <?php endif; ?>
+    </p>
+  <?php else: ?>
+    <div class="list-edit-container">
+      <?php foreach ($this->savedData as $i => $current): ?>
+        <fieldset class="list-edit-group">
+          <h3><?=$this->transEsc('List') ?>: <?=$this->escapeHtml($current['listTitle'])?></h3>
+          <input type="hidden" name="lists[]" value="<?=$current['listId'] ?>"/>
+          <?php if ($this->usertags()->getMode() !== 'disabled'): ?>
+            <div class="form-group">
+              <label class="control-label" for="edit_tags<?=$current['listId'] ?>"><?=$this->transEsc('Tags') ?>:</label>
+              <input type="text" name="tags<?=$current['listId'] ?>" id="edit_tags<?=$current['listId'] ?>" class="form-control" value="<?=$this->escapeHtmlAttr($current['tags'])?>"/>
+              <span class="help-block"><?=$this->transEsc("add_tag_note") ?></span>
+            </div>
+          <?php endif; ?>
+          <div class="form-group">
+            <label class="control-label" for="edit_notes<?=$current['listId'] ?>"><?=$this->transEsc('Notes') ?>:</label>
+            <textarea class="form-control" id="edit_notes<?=$current['listId'] ?>" name="notes<?=$current['listId'] ?>" rows="3"><?=$this->escapeHtml($current['notes'])?></textarea>
+          </div>
+          <a href="<?=$this->url('userList', ['id' => $current['listId']]) ?>?delete=<?=urlencode($this->driver->getUniqueId())?>&amp;source=<?=urlencode($this->driver->getSourceIdentifier())?>" id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>delete<?=$current['listId'] ?>" data-lightbox>
+            <i class="fa fa-trash"></i> <?=$this->transEsc('Delete') ?>
+          </a>
+        </fieldset>
+      <?php endforeach; ?>
+    </div>
+  <?php endif; ?>
+  <?php if (count($this->lists) > 0): ?>
+    <hr/>
+    <div class="form-group">
+      <select name="addToList" class="form-control">
+        <option value="-1">- <?=$this->transEsc('Add to another list')?> -</option>
+        <?php foreach ($this->lists as $listID => $listTitle): ?>
+          <option value="<?=$listID ?>"><?=$this->escapeHtml($listTitle) ?></option>
+        <?php endforeach; ?>
+      </select>
+    </div>
+  <?php endif; ?>
+  <?php if (!empty($this->savedData) || count($this->lists) > 0): ?>
+    <div class="form-group">
+      <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>"/>
+    </div>
+  <?php endif; ?>
+  </form>
+</div>
+<!-- finc - templates - myresearch - edit - END -->
diff --git a/themes/finc/templates/myresearch/editlist.phtml b/themes/finc/templates/myresearch/editlist.phtml
new file mode 100644
index 00000000000..404b909125b
--- /dev/null
+++ b/themes/finc/templates/myresearch/editlist.phtml
@@ -0,0 +1,51 @@
+<!-- finc - templates - myresearch - editlist -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+  // Set up page title:
+  $pageTitle = empty($this->list->id) ? 'Create a List' : "edit_list";
+  $this->headTitle($this->translate($pageTitle));
+
+  // Set up breadcrumbs:
+  $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>'
+    . '<li>' . $this->transEsc($pageTitle) . '</li>';
+?>
+
+<?=$this->flashmessages()?>
+
+<h1><?=$this->transEsc($pageTitle); ?></h1>
+
+<form class="form-edit-list" method="post" name="<?=empty($this->list->id) ? 'newList' : 'editListForm'?>">
+  <input type="hidden" name="id" value="<?=empty($this->list->id) ? 'NEW' : $this->list->id ?>"/>
+  <div class="form-group">
+    <label class="control-label" for="list_title"><?=$this->transEsc('List'); ?>:</label>
+    <input id="list_title" class="form-control" type="text" name="title" value="<?=isset($this->list['title']) ? $this->escapeHtml($this->list['title']) : ''?>"/>
+  </div>
+  <div class="form-group">
+    <label class="control-label" for="list_desc"><?=$this->transEsc('Description') ?></label>
+    <textarea id="list_desc" class="form-control" name="desc" rows="3"><?=isset($this->list['description']) ? $this->escapeHtml($this->list['description']) : ''?></textarea>
+  </div>
+  <?php if ($this->userlist()->getMode() === 'public_only'): ?>
+    <input type="hidden" name="public" value="1" />
+  <?php elseif ($this->userlist()->getMode() === 'private_only'): ?>
+    <input type="hidden" name="public" value="0" />
+  <?php else: ?>
+    <div class="form-group">
+      <label class="control-label"><?=$this->transEsc('Access') ?></label>
+      <div class="radio inline">
+        <label>
+          <input id="list_public_1" type="radio" name="public" value="1"<?php if ($this->list->isPublic()): ?> checked="checked"<?php endif; ?>/> <?=$this->transEsc('Public') ?>
+        </label>
+      </div>
+      <div class="radio inline">
+        <label>
+          <input id="list_public_0" type="radio" name="public" value="0"<?php if (!$this->list->isPublic()): ?> checked="checked"<?php endif; ?>/> <?=$this->transEsc('Private') ?>
+        </label>
+      </div>
+    </div>
+  <?php endif; ?>
+  <div class="form-group">
+    <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>"/>
+  </div>
+</form>
+<!-- finc - templates - myresearch - editlist - END -->
diff --git a/themes/finc/templates/myresearch/newpassword.phtml b/themes/finc/templates/myresearch/newpassword.phtml
new file mode 100644
index 00000000000..beb486bd73a
--- /dev/null
+++ b/themes/finc/templates/myresearch/newpassword.phtml
@@ -0,0 +1,43 @@
+<!-- finc - templates - myresearch - newpassword -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+    // Set up page title:
+    $this->headTitle($this->translate('Create New Password'));
+
+    // Set up breadcrumbs:
+    $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>'
+        . '<li class="active">' . $this->transEsc('Create New Password') . '</li>';
+?>
+<?php if ($this->auth()->isLoggedIn()): ?>
+  <div class="<?=$this->layoutClass('mainbody')?>">
+<?php endif; ?>
+
+<h1><?=$this->transEsc('Create New Password') ?></h1>
+<?=$this->flashmessages() ?>
+
+<?php if (!$this->auth()->getManager()->supportsPasswordChange($this->auth_method)): ?>
+  <div class="error"><?=$this->transEsc('recovery_new_disabled') ?></div>
+<?php elseif (!isset($this->hash)): ?>
+  <div class="error"><?=$this->transEsc('recovery_user_not_found') ?></div>
+<?php else: ?>
+  <form id="newpassword" class="form-new-password" action="<?=$this->url('myresearch-newpassword') ?>" method="post" data-toggle="validator" role="form">
+    <input type="hidden" value="<?=$this->escapeHtmlAttr($this->auth()->getManager()->getCsrfHash())?>" name="csrf"/>
+    <input type="hidden" value="<?=$this->escapeHtmlAttr($this->hash) ?>" name="hash"/>
+    <input type="hidden" value="<?=$this->escapeHtmlAttr($this->username) ?>" name="username"/>
+    <input type="hidden" value="<?=$this->escapeHtmlAttr($this->auth_method) ?>" name="auth_method"/>
+    <?=$this->auth()->getNewPasswordForm() ?>
+    <?=$this->recaptcha()->html($this->useRecaptcha) ?>
+    <div class="form-group">
+      <input class="btn btn-primary" name="submit" type="submit" value="<?=$this->transEsc('Submit')?>" />
+    </div>
+  </form>
+<?php endif; ?>
+
+<?php if ($this->auth()->isLoggedIn()): ?>
+  </div>
+  <div class="<?=$this->layoutClass('sidebar')?>">
+    <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'newpassword'])?>
+  </div>
+<?php endif; ?>
+<!-- finc - templates - myresearch - newpassword - END -->
diff --git a/themes/finc/templates/record/addtag.phtml b/themes/finc/templates/record/addtag.phtml
new file mode 100644
index 00000000000..6871aa6bdf3
--- /dev/null
+++ b/themes/finc/templates/record/addtag.phtml
@@ -0,0 +1,28 @@
+<!-- finc - templates - record - addtag -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+    // Set page title.
+    $this->headTitle($this->translate('Add Tag'));
+
+    // Set up breadcrumbs:
+    $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ')
+      . '<li>' . $this->recordLink()->getBreadcrumb($this->driver) . '</li> '
+      . '<li class="active">' . $this->transEsc('Add Tag') . '</li>';
+?>
+
+<h1><?=$this->transEsc('Add Tags') ?></h1>
+<form method="post" name="tagRecord" class="form-add-tag" data-lightbox-onclose="refreshTagListCallback">
+  <input type="hidden" name="submit" value="1" />
+  <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" />
+  <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" />
+  <div class="form-group">
+    <label class="control-label" for="addtag_tag"><?=$this->transEsc("Tags")?>:</label>
+    <input id="addtag_tag" type="text" name="tag" value="" size="40"  class="form-control"/>
+    <p class="help-block"><?=$this->transEsc("add_tag_note")?></p>
+  </div>
+  <div class="form-group">
+    <input class="btn btn-primary" type="submit" value="<?=$this->transEsc('Save')?>"/>
+  </div>
+</form
+<!-- finc - templates - record - addtag - END -->
diff --git a/themes/finc/templates/record/save.phtml b/themes/finc/templates/record/save.phtml
new file mode 100644
index 00000000000..537c2ecdf07
--- /dev/null
+++ b/themes/finc/templates/record/save.phtml
@@ -0,0 +1,66 @@
+<!-- finc - templates - record - save -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+  // Set page title.
+  $this->headTitle($this->translate('Save'));
+
+  // Set up breadcrumbs:
+  $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ')
+    . '<li>' . $this->recordLink()->getBreadcrumb($this->driver) . '</li> '
+    . '<li class="active">' . $this->transEsc('Save') . '</li>';
+?>
+
+<h1><?=$this->translate("add_to_favorites_html", ['%%title%%' => $this->escapeHtml($this->driver->getBreadcrumb())]) ?></h1>
+<form class="form-record-save" method="post" action="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" name="saveRecord" data-lightbox-onclose="checkSaveStatusesCallback">
+  <input type="hidden" name="submit" value="1" />
+  <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId()) ?>" />
+  <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" />
+  <?php if (!empty($this->containingLists)): ?>
+    <p><?=$this->transEsc('This item is already part of the following list/lists') ?>:
+    <?php foreach ($this->containingLists as $i => $list): ?>
+      <a href="<?=$this->url('userList', ['id' => $list['id']]) ?>" data-lightbox-ignore><?=$this->escapeHtml($list['title'])?></a><?php if($i < count($this->containingLists) - 1): ?>, <?php endif; ?>
+    <?php endforeach; ?>
+    </p><hr/>
+  <?php endif; ?>
+
+  <?php /* Only display the list drop-down if the user has lists that do not contain
+  this item OR if they have no lists at all and need to create a default list */?>
+  <?php $showLists = (!empty($this->nonContainingLists) || (empty($this->containingLists) && empty($this->nonContainingLists))); ?>
+
+  <div class="form-group">
+    <?php if ($showLists): ?>
+      <label class="control-label" for="save_list"><?=$this->transEsc('Choose a List') ?></label>
+    <?php endif; ?>
+    <?php if ($showLists): ?>
+      <select class="form-control" id="save_list" name="list">
+      <?php if ($this->nonContainingLists): ?>
+        <?php foreach ($this->nonContainingLists as $list): ?>
+          <option value="<?=$list['id'] ?>"<?php if ($list['id'] == $this->userlist()->lastUsed()): ?> selected="selected"<?php endif; ?>><?=$this->escapeHtml($list['title'])?></option>
+        <?php endforeach; ?>
+      <?php else: ?>
+        <option value=""><?=$this->transEsc('My Favorites') ?></option>
+      <?php endif; ?>
+      </select>
+    <?php endif; ?>
+    <a class="btn btn-link" id="make-list" href="<?=$this->url('editList', ['id' => 'NEW'])?>?recordId=<?=urlencode($this->driver->getUniqueId())?>&amp;recordSource=<?=urlencode($this->driver->getSourceIdentifier())?>"><?=$showLists ? $this->transEsc('or create a new list') : $this->transEsc('Create a List'); ?></a>
+  </div>
+
+  <?php if ($showLists): ?>
+    <?php if ($this->usertags()->getMode() !== 'disabled'): ?>
+      <div class="form-group">
+        <label class="control-label" for="add_mytags"><?=$this->transEsc('Add Tags') ?></label>
+        <input class="form-control" id="add_mytags" type="text" name="mytags" value=""/>
+        <span class="help-block"><?=$this->transEsc("add_tag_note") ?></span>
+      </div>
+    <?php endif; ?>
+    <div class="form-group">
+      <label class="control-label" for="add_notes"><?=$this->transEsc('Add a Note') ?></label>
+      <textarea class="form-control" id="add_notes" name="notes" rows="3"></textarea>
+    </div>
+    <div class="form-group">
+      <input class="btn btn-primary" type="submit" value="<?=$this->transEsc('Save') ?>"/>
+    </div>
+  <?php endif; ?>
+</form>
+<!-- finc - templates - record - save -->
diff --git a/themes/finc/templates/search/history.phtml b/themes/finc/templates/search/history.phtml
index 121c1c7262a..29d7a3adc3c 100644
--- a/themes/finc/templates/search/history.phtml
+++ b/themes/finc/templates/search/history.phtml
@@ -1,4 +1,6 @@
 <!-- finc - templates - search - history -->
+<?php /* h2 becomes h1 - #17596 - HR */?>
+
 <?php
   // Set page title.
   $this->headTitle($this->translate('Search History'));
@@ -11,16 +13,24 @@
 ?>
 
 <div class="<?=$this->layoutClass('mainbody')?>">
+  <?php if ($saveSupported && !empty($this->saved)): ?>
+    <h1 class="sr-only"><?=$this->transEsc('Search History')?></h1>
+  <?php endif; ?>
+
   <?php /* finc V5: toggler was missing, remove entire template (!) when fixed in BS3 theme - CK */ ?>
   <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler-myresearch'); ?>
 
   <?=$this->flashmessages()?>
   <?php if ($saveSupported && !empty($this->saved)): ?>
-    <h1><?=$this->transEsc("history_saved_searches")?></h1>
+    <h2><?=$this->transEsc("history_saved_searches")?></h2>
     <?=$this->context()->renderInContext('search/history-table.phtml', ['showSaved' => true]);?>
   <?php endif; ?>
 
-  <h2><?=$this->transEsc("history_recent_searches")?></h2>
+  <?php if ($saveSupported && !empty($this->saved)): ?>
+    <h2><?=$this->transEsc("history_recent_searches")?></h2>
+  <?php else: ?>
+    <h1><?=$this->transEsc("history_recent_searches")?></h1>
+  <?php endif; ?>
   <?php if (!empty($this->unsaved)): ?>
     <?=$this->context()->renderInContext('search/history-table.phtml', ['showSaved' => false]);?>
     <a href="?purge=true"><i class="fa fa-remove" aria-hidden="true"></i> <?=$this->transEsc("history_purge")?></a>
@@ -39,3 +49,4 @@
      ?>
   </div>
 <?php endif; ?>
+<!-- finc - templates - search - history - END -->
diff --git a/themes/finc/templates/search/newitem.phtml b/themes/finc/templates/search/newitem.phtml
new file mode 100644
index 00000000000..e1af6817675
--- /dev/null
+++ b/themes/finc/templates/search/newitem.phtml
@@ -0,0 +1,43 @@
+<!-- finc - templates - search - newitem -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+    // Set up page title:
+    $this->headTitle($this->translate('New Item Search'));
+
+    // Set up breadcrumbs:
+    $this->layout()->breadcrumbs = '<li class="active">' . $this->transEsc('New Items') . '</li>';
+
+    // Convenience variable:
+    $offlineMode = $this->ils()->getOfflineMode();
+?>
+
+<h1><?=$this->transEsc('Find New Items')?></h1>
+<?php if ($offlineMode == "ils-offline"): ?>
+  <?=$this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message'])?>
+<?php endif; ?>
+<form method="get" class="form-search-newitem">
+  <div class="form-group">
+    <label class="control-label"><?=$this->transEsc('Range')?>:</label>
+    <div class="btn-group" data-toggle="buttons">
+      <?php foreach ($this->ranges as $key => $range): ?>
+        <label class="btn btn-primary<?php if($key == 0): ?> active<?php endif ?>">
+          <input type="radio" name="range" id="newitem_range_<?=$this->escapeHtmlAttr($key)?>" value="<?=$this->escapeHtmlAttr($range)?>"<?=($key == 0) ? ' checked="checked"' : ''?>/>
+          <?=($range == 1) ? $this->transEsc('Yesterday') : $this->transEsc('past_days', ['%%range%%' => $this->escapeHtml($range)])?>
+        </label>
+      <?php endforeach; ?>
+    </div>
+  </div>
+  <?php if (is_array($this->fundList) && !empty($this->fundList)): ?>
+    <div class="form-group">
+      <label class="control-label" for="newitem_department"><?=$this->transEsc('Department')?>:</label>
+      <select id="newitem_department" name="department" size="10" class="form-control">
+      <?php foreach ($this->fundList as $fundId => $fund): ?>
+        <option value="<?=$this->escapeHtmlAttr($fundId)?>"><?=$this->transEsc($fund)?></option>
+      <?php endforeach; ?>
+      </select>
+    </div>
+  <?php endif; ?>
+  <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Find')?>"/>
+</form>
+<!-- finc - templates - search - newitem - END -->
diff --git a/themes/finc/templates/search/reserves.phtml b/themes/finc/templates/search/reserves.phtml
new file mode 100644
index 00000000000..8a78cc68917
--- /dev/null
+++ b/themes/finc/templates/search/reserves.phtml
@@ -0,0 +1,60 @@
+<!-- finc - templates - search - reserves -->
+<?php /* copied from bootstrap3 - h2 becomes h1 - #17596 - HR */?>
+
+<?php
+    // Set up page title:
+    $this->headTitle($this->translate('Reserves Search'));
+
+    // Set up breadcrumbs:
+    $this->layout()->breadcrumbs = '<li class="active">' . $this->transEsc('Reserves') . '</li>';
+
+    // Convenience variable:
+    $offlineMode = $this->ils()->getOfflineMode();
+?>
+
+<?php if ($offlineMode == "ils-offline"): ?>
+  <?=$this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message'])?>
+<?php else: ?>
+  <h1><?=$this->transEsc('Search For Items on Reserve')?></h1>
+  <form method="get" name="searchForm" class="form-search-reserves">
+    <?php if (is_array($this->courseList)): ?>
+      <div class="form-group">
+        <label for="reserves_by_course" class="control-label"><?=$this->transEsc('By Course')?>:</label>
+        <select name="course" id="reserves_by_course" class="form-control">
+          <option></option>
+          <?php foreach ($this->courseList as $courseId => $courseName): ?>
+            <option value="<?=$this->escapeHtmlAttr($courseId)?>"><?=$this->escapeHtml($courseName)?></option>
+          <?php endforeach; ?>
+        </select>
+        <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Find')?>"/>
+      </div>
+    <?php endif; ?>
+
+    <?php if (is_array($this->instList)): ?>
+      <div class="form-group">
+        <label for="reserves_by_inst" class="control-label"><?=$this->transEsc('By Instructor')?>:</label>
+        <select name="inst" id="reserves_by_inst" class="form-control">
+          <option></option>
+          <?php foreach ($this->instList as $instId => $instName): ?>
+            <option value="<?=$this->escapeHtmlAttr($instId)?>"><?=$this->escapeHtml($instName)?></option>
+          <?php endforeach; ?>
+        </select>
+        <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Find')?>"/>
+      </div>
+    <?php endif; ?>
+
+    <?php if (is_array($this->deptList)): ?>
+      <div class="form-group">
+        <label for="reserves_by_dept" class="control-label"><?=$this->transEsc('By Department')?>:</label>
+        <select name="dept" id="reserves_by_dept" class="form-control">
+          <option></option>
+          <?php foreach ($this->deptList as $deptId => $deptName): ?>
+            <option value="<?=$this->escapeHtmlAttr($deptId)?>"><?=$this->escapeHtml($deptName)?></option>
+          <?php endforeach; ?>
+        </select>
+        <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Find')?>"/>
+      </div>
+    <?php endif; ?>
+  </form>
+<?php endif; ?>
+<!-- finc - templates - search - reserves - END -->
diff --git a/themes/finc/templates/search/results.phtml b/themes/finc/templates/search/results.phtml
index 3b68185ad5b..1175c8e358f 100644
--- a/themes/finc/templates/search/results.phtml
+++ b/themes/finc/templates/search/results.phtml
@@ -55,6 +55,7 @@ $this->headScript()->appendFile("check_save_statuses.js");
 
 <?php /* finc: we need search-results-col to pull content to full width, also used in print styles! - CK */?>
 <div class="<?=$this->layoutClass('mainbody')?> search-results-col">
+  <h1 class="sr-only"><?=$this->transEsc('Search Results')?></h1>
     <?php if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?>
     <?php foreach ($this->results->getRecommendations('top') as $index => $current): ?>
       <?=$this->recommend($current, 'top', $index)?>
-- 
GitLab