From 850c51c10131e3747577d52e7da7b712bbecd9fe 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: Mason James (cherry picked from commit 318f62227169215d8e6c1fcb4171025df1c87e3a) Signed-off-by: Julian Maurice --- circ/returns.pl | 28 ++++++++------ .../prog/en/modules/circ/returns.tt | 37 +++++++++++-------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index 0652a4d39b..07dd8db57a 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..... # @@ -404,11 +404,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, @@ -448,11 +451,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 b84d0555ba..4eb51748e0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -5,6 +5,14 @@ [% USE ItemTypes %] [% USE AuthorisedValues %] +[% 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 %] [% INCLUDE 'doc-head-close.inc' %] @@ -183,13 +191,12 @@ $(document).ready(function () {

[% itembarcode |html %]: [% title |html %]

[% IF ( wborcnum ) %]
Hold for:
-
  • - [% borsurname %], [% borfirstname %] ([% borcnum %])
  • -
  • [% wborstnum %] [% wboraddress %][% IF ( wboraddress2 ) %]
    - [% wboraddress2 %]
    [% END %] - [% wborcity %] [% wborzip %]
  • - [% IF ( wborphone ) %]
  • [% wborphone %]
  • [% END %] - [% IF ( wboremail ) %]
  • [% wboremail %]
  • [% END %] +
    @@ -220,9 +227,8 @@ $(document).ready(function () {

    Hold for:

    • [% borsurname %], [% borfirstname %] ([% borcnum %])
    • -
    • [% borstnum %] [% boraddress %]
      - [% IF ( boraddress2 ) %][% boraddress2 %]
      [% END %] - [% borcity %] [% borzip %]
    • + [% INCLUDE display_holdpatron_address %] + [% IF ( borphone ) %]
    • [% borphone %]
    • [% END %] [% IF ( boremail ) %]
    • [% boremail %]
    • [% END %] [% IF ( debarred ) %]
    • Patron is RESTRICTED
    • [% END %] @@ -269,9 +275,8 @@ $(document).ready(function () {

      Hold for:

      • [% borsurname %], [% borfirstname %] ([% borcnum %])
      • -
      • [% borstnum %] [% boraddress %]
        - [% IF ( boraddress2 ) %][% boraddress2 %]
        [% END %] - [% borcity %] [% borzip %]
      • + [% INCLUDE display_holdpatron_address %] + [% IF ( borphone ) %]
      • [% borphone %]
      • [% END %] [% IF ( boremail ) %]
      • [% IF ( transfertodo ) %][% boremail %][% ELSE %][% boremail %][% END %]
      • [% END %] [% IF ( debarred ) %]
      • Patron is RESTRICTED
      • [% END %] @@ -381,9 +386,9 @@ $(document).ready(function () {
      • [% borsurname %], [% borfirstname %] ([% borcnum %])
      • -
      • [% borstnum %] [% boraddress %]
        - [% IF ( boraddress2 ) %][% boraddress2 %]
        [% END %] - [% borcity %] [% borzip %]
      • + + [% INCLUDE display_holdpatron_address %] + [% IF ( borphone ) %]
      • [% borphone %]
      • [% END %] [% IF ( boremail ) %]
      • [% IF ( transfertodo ) %][% boremail %][% ELSE %][% boremail %][% END %]
      • [% END %] [% IF ( debarred ) %]
      • Patron is RESTRICTED
      • [% END %] -- 2.39.5