From 56005d6684b42d6b15ec982c48e9d77a96d1858d Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 13 Jul 2011 12:24:38 -0400 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/opac/staff.js | 7 +++++++ Open-ILS/web/templates/default/opac/parts/org_selector.tt2 | 11 +++++++++-- Open-ILS/web/templates/default/opac/parts/place_hold.tt2 | 9 ++++----- Open-ILS/xul/staff_client/server/patron/holds.js | 3 ++- 4 files changed, 22 insertions(+), 8 deletions(-) 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; %] -