redirect = redirect.replace('^http:', 'https:')
%]
<input type="hidden" name="redirect_to" value="[% redirect | html %]" />
- <input type="hidden" name="hold_source_page" value="[% CGI.param('hold_source_page') | html %]" />
+ [%
+ usr_barcode = CGI.param('usr_barcode') | html;
+ is_requestor = CGI.param('is_requestor');
+
+ IF is_requestor == '';
+ is_requestor = '0';
+ END;
+
+ IF is_requestor == '0' && usr_barcode == ctx.staff_recipient.card.barcode;
+ usr_barcode = '';
+ END;
+ %]
[% IF ctx.is_staff %]
<p class="staff-hold">
[% l("Place hold for patron by barcode:") %]
</label>
<input type="text" name="hold_usr" id="hold_usr_input"
- value="[% CGI.param('usr_barcode') | html %]"
+ value="[% usr_barcode | html %]"
onchange="staff_hold_usr_barcode_changed();"
onpaste="setTimeout(staff_hold_usr_barcode_changed,1);"
onkeypress="return no_hold_submit(event)" autofocus />
}
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;
// 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]);