From: Lebbeous Fogle-Weekley Date: Wed, 13 Jul 2011 16:24:38 +0000 (-0400) Subject: Preset correct default pickup lib for staff placing holds for patrons X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=56005d6684b42d6b15ec982c48e9d77a96d1858d;p=contrib%2FConifer.git Preset correct default pickup lib for staff placing holds for patrons Also, for hold placement, only enable org unit selection where can_have_vols is true. Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js index b5ef7f5285..16234b569f 100644 --- a/Open-ILS/web/js/ui/default/opac/staff.js +++ b/Open-ILS/web/js/ui/default/opac/staff.js @@ -20,6 +20,13 @@ function staff_hold_usr_input_disabler(input) { } function staff_hold_usr_prepop() { if (xulG && xulG.patron_barcode) { + var sel = document.getElementById("pickup_lib"); + for (var i = 0; i < sel.options.length; i++) { + if (sel.options[i].value == xulG.patron_home_ou) { + sel.selectedIndex = i; + break; + } + } document.getElementById("hold_usr_input").value = xulG.patron_barcode; document.getElementById("hold_usr_input").disabled = false; document.getElementById("hold_usr_is_requestor_not").checked = true; diff --git a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 index 2daf63ad75..d8d3fc788e 100644 --- a/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/org_selector.tt2 @@ -1,6 +1,13 @@ [% - BLOCK build_org_selector_options; %] -