PINES Workaround for broken place hold links
authorTerran McCanna <tmccanna@georgialibraries.org>
Tue, 2 Mar 2021 19:21:24 +0000 (14:21 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 8 Nov 2021 14:58:45 +0000 (09:58 -0500)
This is a temporary workaround for the broken Cancel / Continue /
Back to Search buttons in the OPAC. This workaround can be removed
when a fix for https://bugs.launchpad.net/evergreen/+bug/1917513
is developed.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates-bootstrap/opac/parts/place_hold.tt2
Open-ILS/src/templates-bootstrap/opac/parts/place_hold_result.tt2

index e70e42a..0a149b2 100755 (executable)
@@ -344,7 +344,7 @@ function maybeToggleNumCopies(obj) {
         <div class="py-3">
         <button id="place_hold_submit" type="submit" name="submit"  class="btn btn-confirm" ><i class="fas fa-check"></i> [% l('Submit') %]</button>
         [% END # some_holds_allowed %]
-        <button type="reset" name="cancel" onclick="window.location='[% redirect | html %]'" id="holds_cancel" class="btn btn-deny"><i class="fas fa-ban" aria-hidden="true"></i> [% l('Cancel') %]</button>
+        <button type="reset" name="cancel" onclick="javascript:history.go(-1);" id="holds_cancel" class="btn btn-deny"><i class="fas fa-ban" aria-hidden="true"></i> [% l('Cancel') %]</button>
         </div>
     </form>
 </div>
index 6f2597d..ea563db 100755 (executable)
@@ -151,11 +151,11 @@ function disable_submit() {
         [% END %]
 
         [% IF any_failures OR ctx.general_hold_error %]
-        <span><a class="btn btn-confirm" href="[% CGI.param('redirect_to') || CGI.referer | html %]"><i class="fas fa-arrow-circle-left" aria-hidden="true"></i> [% l('Back To Search') %]</a></span>
-        <a class="btn btn-deny" href="[% CGI.param('redirect_to') || CGI.referer | html %]"><i class="fas fa-times" aria-hidden="true"></i> [% l('Cancel') %]</a>
+        <span><a class="btn btn-confirm" href="javascript:history.go(-2);"><i class="fas fa-arrow-circle-left" aria-hidden="true"></i> [% l('Back To Search') %]</a></span>
+        <a class="btn btn-deny" href="javascript:history.go(-2);"><i class="fas fa-times" aria-hidden="true"></i> [% l('Cancel') %]</a>
         [% ELSE %]
         <div class='hold_success_links'>
-          <span><a class="btn btn-confirm" href="[% CGI.param('redirect_to') || CGI.referer | html %]"><i class="fas fa-arrow-circle-left" aria-hidden="true"></i> [% l('Back To Search') %]</a></span>
+          <span><a class="btn btn-confirm" href="javascript:history.go(-2);"><i class="fas fa-arrow-circle-left" aria-hidden="true"></i> [% l('Back To Search') %]</a></span>
            [% IF ctx.is_staff %]
              [% IF CGI.param('hold_type') == 'C';
                   hold_type_label = l('copy');