LP#1406387 Fix for Holds Placement Advanced Options
authorAdam Bowling <abowling@emeralddata.net>
Mon, 19 Jan 2015 17:05:19 +0000 (12:05 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sun, 17 Sep 2017 20:10:29 +0000 (16:10 -0400)
In the staff client, when placing a hold and clicking
Advanced Hold Options, the barcode input will populate
with the staff member's barcode if it was previously
empty, regardless of whether the radio input for the
hold was specified for a patron or the staff member.

This patch corrects that behavior, and also populates
the input radio on load after clicking Advanced Hold
Options.

Signed-off-by: Adam Bowling <abowling@emeralddata.net>
Conflicts:
Open-ILS/src/templates/opac/parts/place_hold.tt2

Revert "LP#1406387 Fix for Holds Placement Advanced Options"

Not working for us yet, so reverting.

This reverts commit 2322ee5ae9cbe3caefb6998d62c3716cf40411a3.

Conflicts:
Open-ILS/src/templates/opac/parts/place_hold.tt2

Open-ILS/src/templates/opac/parts/place_hold.tt2
Open-ILS/web/js/ui/default/opac/staff.js

index 84bd822..cfbde9f 100644 (file)
@@ -158,13 +158,8 @@ function toggleActivationDate() {
                         <!-- Grab the bre_id so that we can restore it if user accidentally clicks advanced options -->
                            [% bre_id = hdata.target.id %]
                             <a  id='advanced_hold_link'
-<<<<<<< HEAD
                                 href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id, bre_id => bre_id}) %]">
-                                [% l('Advanced Hold Options') %]</a>
-=======
-                                href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id}) %]">
                                 <br/><b>[% l('Advanced Hold Options') %]</a></b>
->>>>>>> a25fe69... OPAC UI modifications as per OPAC Working Group suggestions.
                         [% END %]
                         [% IF CGI.param('hold_type') == 'M' AND CGI.param('bre_id') %]
                             <input type="hidden" name="bre_id" value="[% CGI.param('bre_id') %]" />
index 37d9a3c..6aafa90 100644 (file)
@@ -42,13 +42,6 @@ function staff_hold_usr_barcode_changed(isload) {
     }
 
     if (!window.xulG) return;
-    var adv_link = document.getElementById('advanced_hold_link');
-    if (adv_link) {
-        adv_link.setAttribute('href', adv_link.getAttribute('href').replace(/&?is_requestor=[01]/,''));
-        var is_requestor = document.getElementById('hold_usr_is_requestor').checked ? 1 : 0;
-        adv_link.setAttribute('href', adv_link.getAttribute('href') + '&is_requestor=' + is_requestor.toString());
-    }
 
     var cur_hold_barcode = undefined;
     var barcode = isload;
@@ -164,21 +157,6 @@ window.onload = function() {
     // record details page events
 
     setTimeout(function() {
-
-        if (location.href.match(/is_requestor=[01]/)) {
-            var loc = location.href;
-            var is_req_match = new RegExp("is_requestor=[01]");
-            var is_req = is_req_match.exec(loc).toString();
-            is_req = is_req.replace(/is_requestor=/, '');
-            if (is_req == "1") {
-                document.getElementById('hold_usr_is_requestor').checked = 'checked';
-                document.getElementById('hold_usr_input').disabled = true;
-            } else {
-                document.getElementById('hold_usr_is_requestor_not').checked = 'checked';
-                document.getElementById('hold_usr_input').disabled = false;
-            }
-        }
-
         var rec = location.href.match(/\/opac\/record\/(\d+)/);
         if(rec && rec[1]) { 
             runEvt('rdetail', 'recordRetrieved', rec[1]);