From 318f62227169215d8e6c1fcb4171025df1c87e3a 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 --- 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 821055acfd..2197f67ba0 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..... # @@ -411,11 +411,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 66801dc500..b971dc7eb1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -6,6 +6,14 @@ [% USE AuthorisedValues %] [% USE ColumnsSettings %] +[% 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 %] @@ -206,13 +214,12 @@ $(document).ready(function () { [% IF ( wborcnum ) %]
Hold for:
-
  • - [% borsurname %], [% borfirstname %] ([% borcnum %])
  • -
  • [% wborstnum %] [% wboraddress %][% IF ( wboraddress2 ) %]
    - [% wboraddress2 %]
    [% END %] - [% wborcity %] [% wborzip %]
  • - [% IF ( wborphone ) %]
  • [% wborphone %]
  • [% END %] - [% IF ( wboremail ) %]
  • [% wboremail %]
  • [% END %] +
    @@ -243,9 +250,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 %] @@ -291,9 +297,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 %] @@ -403,9 +408,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