From: Bill Erickson Date: Tue, 25 Feb 2014 19:58:06 +0000 (-0500) Subject: LP#1284864 propagate patron barcode to advanced hold options X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a65b30ec5da2f53994e737a9a83dbcfe4fbe3f88;p=working%2FEvergreen.git LP#1284864 propagate patron barcode to advanced hold options 1. Staff searches the catalog within the staff client, not focused on a patron. 2. Staff types a barcode into the patron barcode input 3. Staff clicks "Advanced Holds Options" and the typed barcode now propagates to the metarecord hold page. -- Minor HTML cleanup to avoid 350+-wide character columns. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2 index 390b9ea297..52d3183562 100644 --- a/Open-ILS/src/templates/opac/parts/place_hold.tt2 +++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2 @@ -23,8 +23,17 @@ -
- + + +
+ + [% l('Advanced Hold Options') %] [% END %] [% IF hdata.metarecord_filters.formats.size OR # should this be size > 1 diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js index 2be839f36b..be803c94e3 100644 --- a/Open-ILS/web/js/ui/default/opac/staff.js +++ b/Open-ILS/web/js/ui/default/opac/staff.js @@ -94,6 +94,16 @@ function staff_hold_usr_barcode_changed(isload) { document.getElementById('patron_name').innerHTML = load_info.patron_name; document.getElementById("patron_usr_barcode_not_found").style.display = 'none'; } + + // update the advanced hold options link to propagate the patron + // barcode if clicked. This is needed when the patron barcode + // is manually entered (i.e. the staff client does not provide one). + var adv_link = document.getElementById('advanced_hold_link'); + var href = adv_link.getAttribute('href').replace( + /;staff_barcode=[^;\&]+|$/, + ';staff_barcode=' + encodeURIComponent(cur_hold_barcode)); + adv_link.setAttribute('href', href); + // Ok, now we can allow submitting again, unless this is a "true" load, in which case we likely have a blank barcode box active if (isload !== true) document.getElementById('place_hold_submit').disabled = false;