Bugzilla – Attachment 124442 Details for
Bug 21794
Incomplete address displayed on patron details page when City field is empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21794: Fix display of addresses on details tab in staff when city is empty
Bug-21794-Fix-display-of-addresses-on-details-tab-.patch (text/plain), 5.77 KB, created by
Hayley Pelham
on 2021-09-02 23:55:48 UTC
(
hide
)
Description:
Bug 21794: Fix display of addresses on details tab in staff when city is empty
Filename:
MIME Type:
Creator:
Hayley Pelham
Created:
2021-09-02 23:55:48 UTC
Size:
5.77 KB
patch
obsolete
>From 88c09b67869ddf160aa0f6f1578b9f14d8e6a3c1 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 24 Aug 2021 00:34:13 +0200 >Subject: [PATCH] Bug 21794: Fix display of addresses on details tab in staff > when city is empty > >If the city field was not filled out on the main or alternate address, >the content of state, country and zipcode wouldn't display on the >Details tab in the patron account in staff. > >To test: >- Enter main contact and alternate address without city >- Verify that the address information isn't shown on the details > tab after saving >- Apply patch >- Verify that the information is displayed now >- Toggle AddressFormat and check display is correct for all settings >- Switch back to US address format >- Try several combinations of empty fields for city, zipcode, country > and state. The punctuation and whitespace should always appear > correctly. > >Examples: >- Enter just country >- Enter zipcode and country >- ... > >Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> >--- > .../prog/en/includes/member-display-address-style.inc | 10 +++++----- > .../prog/en/includes/member-display-alt-address-style.inc | 10 +++++----- > 2 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc >index 5011d33d92..a79532b5cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc >@@ -23,10 +23,10 @@ > <li class="patronaddress2">[%~ patron.address2 |html ~%]</li> > [%~ END ~%] > [%~ END ~%] >- [%~ IF ( patron.city ) ~%] >+ [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%] > <li class="patroncity"> >- [%~ patron.city |html ~%][%~ IF ( patron.state ) %], [% patron.state |html ~%][%~ END ~%] >- [%~ " " _ patron.zipcode |html ~%][%~ IF ( patron.country ) %], [% patron.country |html ~%][%~ END ~%] >+ [%~ patron.city |html ~%][%~ IF ( patron.state ) %][%~ IF ( patron.city ) ~%], [% END ~%][% patron.state |html ~%][%~ END ~%] >+ [%~ IF ( patron.zipcode ) %][%~ " " _ patron.zipcode |html ~%][% END %][%~ IF ( patron.country ) %][%~ IF ( patron.zipcode || patron.state ) ~%], [% END ~%][% patron.country |html ~%][%~ END ~%] > </li> > [%~ END ~%] > [%~ END ~%] >@@ -44,7 +44,7 @@ > <li class="patronaddress2">[%~ patron.address2 | html ~%]</li> > [%~ END ~%] > [%~ END ~%] >- [%~ IF ( patron.city ) ~%] >+ [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%] > <li class="patroncity"> > [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%][% line_break | $raw %][%~ patron.state | html ~%][%~ END ~%] > [%~ IF ( patron.country ) ~%][% line_break | $raw %][%~ patron.country | html ~%][%~ END ~%] >@@ -68,7 +68,7 @@ > <li class="patronaddress2">[%~ patron.address2 | html ~%]</li> > [%~ END ~%] > [%~ END ~%] >- [%~ IF ( patron.city ) ~%] >+ [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%] > <li class="patroncity"> > [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%][% line_break | $raw %][%~ patron.state | html ~%][%~ END ~%] > [%~ IF ( patron.country ) ~%][% line_break | $raw %][%~ patron.country | html ~%][%~ END ~%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style.inc >index 3eeada0378..57b7d05222 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style.inc >@@ -20,10 +20,10 @@ > <li class="patronaddress2">[% patron.B_address2 | html %]</li> > [% END %] > [% END %] >- [% IF ( patron.B_city ) %] >+ [% IF ( patron.B_city || patron.B_state || patron.B_country || patron.B_zipcode ) %] > <li class="patroncity"> >- [% patron.B_city | html %][% IF ( patron.B_state ) %], [% patron.B_state | html %][% END %] >- [% patron.B_zipcode | html %][% IF ( patron.B_country ) %], [% patron.B_country | html %][% END %] >+ [% patron.B_city | html %][% IF ( patron.B_state ) %][% IF ( patron.B_city ) %], [% END %][%~ patron.B_state | html ~%][%~ END ~%] >+ [% IF ( patron.B_zipcode ) %][%~ " " _ patron.B_zipcode |html ~%][% END %][% IF ( patron.B_country ) %][% IF ( patron.B_zipcode || patron.B_state ) %], [% END %][% patron.B_country | html %][% END %] > </li> > [% END %] > [% END %] >@@ -41,7 +41,7 @@ > <li class="patronaddress2">[% patron.B_address2 | html %]</li> > [% END %] > [% END %] >- [% IF ( patron.B_city ) %] >+ [% IF ( patron.B_city || patron.B_state || patron.B_country || patron.B_zipcode ) %] > <li class="patroncity"> > [%IF ( patron.B_zipcode ) %][% patron.B_zipcode | html %] [% END %][% patron.B_city | html %][% IF ( patron.B_state ) %]</br>[% patron.B_state | html %][% END %] > [% IF ( patron.B_country ) %]<br />[% patron.B_country | html %][% END %] >@@ -65,7 +65,7 @@ > <li class="patronaddress2">[% patron.B_address2 | html %]</li> > [% END %] > [% END %] >- [% IF ( patron.B_city ) %] >+ [% IF ( patron.B_city || patron.B_state || patron.B_country || patron.B_zipcode ) %] > <li class="patroncity"> > [%IF ( patron.B_zipcode ) %][% patron.B_zipcode | html %] [% END %] > [% patron.B_city | html %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21794
:
82136
|
124055
|
124442
|
124511
|
124512