From b3b11fd52f2fdeb74ab4c7c1ba28b57fa932992d Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Wed, 30 Jul 2014 16:46:55 -0400 Subject: [PATCH] Possible fix for KPAC Holds bug. --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm | 5 ++++- Open-ILS/src/templates/kpac/getit.tt2 | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 9a2ebdbb29..c0fcca3530 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -93,12 +93,15 @@ sub load_getit { ]); } - # If user is logged in and has a default pickup location for holds, grab it + # If user is logged in and has a default pickup location and phone for holds, grab them if ($ctx->{user}) { my $set_map = $self->ctx->{user_setting_map}; if ($$set_map{'opac.default_pickup_location'}) { $ctx->{default_pickup_lib} = $$set_map{'opac.default_pickup_location'}; } + if ($$set_map{'opac.default_phone'}) { + $ctx->{default_phone} = $$set_map{'opac.default_phone'}; + } } $self->ctx->{page} = 'getit'; # repair the page diff --git a/Open-ILS/src/templates/kpac/getit.tt2 b/Open-ILS/src/templates/kpac/getit.tt2 index 6408af371f..ec467bcf71 100644 --- a/Open-ILS/src/templates/kpac/getit.tt2 +++ b/Open-ILS/src/templates/kpac/getit.tt2 @@ -71,7 +71,20 @@ [% def_lib = ctx.default_pickup_lib || ctx.physical_loc; PROCESS "opac/parts/org_selector.tt2"; INCLUDE build_org_selector name='pickup_lib' - value=def_lib id='pickup_lib' can_have_vols_only=1 %] + value=def_lib id='pickup_lib' can_have_vols_only=1 hold_pickup_lib=1 %] + + + [%- IF ctx.user.email -%] + + [%- END -%] + + [%- IF allow_phone_notifications == 'true' -%] + + + [%- END -%] + -- 2.11.0