From 01edde4d2f8dc524ac504185fdac0c5ad65d8f16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Sun, 26 Mar 2017 17:26:22 +0200 Subject: [PATCH] Bug 18335 - Check in: Make patron info in hold messages obey syspref AddressFormat When checking in, information about patrons with a hold always display in an US style. Address information should opey the system preference AddressFormat To reproduce: - Set syspref AddressFormat to German style - Check out an item to a patron A - Put a hold on this item for patron B - Check in item using the Check in field in page header - Result: In message 'Hold found', address does not display in German style To test: - Apply patch - Repeat steps above - Verify that address displays as expected Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 8b0bed34c20b21865d76992b7822bc3874867cbc) Signed-off-by: Katrin Fischer --- circ/returns.pl | 28 +++++++----- .../prog/en/modules/circ/returns.tt | 45 ++++++++----------- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index b2b29999b3..ad91e52706 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -90,7 +90,7 @@ my $printer = $userenv->{'branchprinter'} // ''; my $forgivemanualholdsexpire = $query->param('forgivemanualholdsexpire'); my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') ne 'off'); -# + # # Some code to handle the error if there is no branch or printer setting..... # @@ -409,11 +409,14 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { wbortitle => $borr->{'title'}, wborphone => $borr->{'phone'}, wboremail => $borr->{'email'}, - wborstnum => $borr->{streetnumber}, - wboraddress => $borr->{'address'}, - wboraddress2 => $borr->{'address2'}, - wborcity => $borr->{'city'}, - wborzip => $borr->{'zipcode'}, + streetnumber => $borr->{streetnumber}, + streettype => $borr->{streettype}, + address => $borr->{'address'}, + address2 => $borr->{'address2'}, + city => $borr->{'city'}, + zipcode => $borr->{'zipcode'}, + state => $borr->{'state'}, + country => $borr->{'country'}, wborrowernumber => $reserve->{'borrowernumber'}, wborcnum => $borr->{'cardnumber'}, wtransfertFrom => $userenv_branch, @@ -451,11 +454,14 @@ if ( $messages->{'ResFound'}) { bortitle => $borr->{'title'}, borphone => $borr->{'phone'}, boremail => $borr->{'email'}, - boraddress => $borr->{'address'}, - boraddress2 => $borr->{'address2'}, - borstnum => $borr->{streetnumber}, - borcity => $borr->{'city'}, - borzip => $borr->{'zipcode'}, + streetnumber => $borr->{streetnumber}, + streettype => $borr->{streettype}, + address => $borr->{'address'}, + address2 => $borr->{'address2'}, + city => $borr->{'city'}, + zipcode => $borr->{'zipcode'}, + state => $borr->{'state'}, + country => $borr->{'country'}, borcnum => $borr->{'cardnumber'}, debarred => $borr->{'debarred'}, gonenoaddress => $borr->{'gonenoaddress'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c1a6626ae0..fe8c733357 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -21,6 +21,14 @@ [% END %] [% END %] +[% BLOCK display_holdpatron_address %] + [% IF Koha.Preference( 'AddressFormat' ) %] + [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] + [% ELSE %] + [% INCLUDE 'member-display-address-style-us.inc' %] + [% END %] +[% END %] + [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Check in [% title |html %] @@ -226,13 +234,12 @@ $(document).ready(function () { [% IF ( wborcnum ) %]
Hold for:
-