From 05b15d89b6cdb947fd593d4c1cf128b441208140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 26 Mar 2017 17:26:22 +0200 Subject: [PATCH] [SIGNED-OFF] 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 --- circ/returns.pl | 28 ++++++++------ .../intranet-tmpl/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 6e27645..3ef887f 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -92,7 +92,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..... # @@ -413,11 +413,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, @@ -455,11 +458,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 e1c8c0b..899367d 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 %] @@ -227,13 +235,12 @@ $(document).ready(function () { [% IF ( wborcnum ) %]
Hold for:
-