Commit 03795b65 authored by Marc Véron's avatar Marc Véron Committed by Kyle M Hall

Bug 10760: Alternate Address: Display street number and street type

This patch displays alternate streetnumber and street type on patron's
detail page.

To test:
- Apply patch
- Verify that the alternate address information displays follwing the
  setting in syspref AddressFormat and contains street type and
  street number (as appropriate)
Signed-off-by: default avatarOwen Leonard <oleonard@myacpl.org>
Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
parent 3e576f65
[% IF ( B_address or B_address2 ) %]
[% IF ( B_address ) %]
[% SET roadtype_desc = '' %]
[% IF B_streettype %]
[% SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', B_streettype) %]
[% END %]
<li class="patronaddress1">[% B_address %][%IF roadtype_desc %] [% roadtype_desc %][% END %][% IF B_streetnumber %] [% B_streetnumber %][% END %]</li>
[% END %]
[% IF ( B_address2 ) %]
<li class="patronaddress2">[% B_address2 %]</li>
[% END %]
[% END %]
[% IF ( B_city ) %]<li class="patroncity">
[%IF ( B_zipcode ) %][% B_zipcode %] [% END %][% B_city %][% IF ( B_state ) %]</br>[% B_state %][% END %]
[% IF ( B_country ) %]<br />[% B_country %][% END %]</li>
[% END %]
[% IF ( B_address or B_address2 ) %]
[% IF ( B_address ) %]
[% SET roadtype_desc = '' %]
[% IF B_streettype %]
[% SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', B_streettype) %]
[% END %]
<li class="patronaddress1">[% if (B_streetnumber) %][% B_streetnumber %][% end %] [% IF roadtype_desc %][% roadtype_desc %] [% END %][% B_address %][% end %]</li>
[% END %]
[% IF ( B_address2 ) %]
<li class="patronaddress2">[% B_address2 %]</li>
[% END %]
[% END %]
[% IF ( B_city ) %]<li class="patroncity">
[% B_city %][% IF ( B_state ) %], [% B_state %][% END %]
[% B_zipcode %][% IF ( B_country ) %], [% B_country %][% END %]</li>
[% END %]
......@@ -430,12 +430,14 @@ function validate1(date) {
[% UNLESS ( I ) %]
<div id="patron-alternate-address" style="padding-top: 1em;">
<h3>Alternate address</h3>
<div class="rows"> <ol><li><span class="label">Address: </span>[% B_address %]</li>
<li><span class="label">Address 2: </span>[% B_address2 %]</li>
<li><span class="label">City: </span>[% B_city %]</li>
[% IF ( B_state ) %]<li><span class="label">State: </span>[% B_state %]</li>[% END %]
<li><span class="label">ZIP/Postal code: </span>[% B_zipcode %]</li>
[% IF ( B_country ) %]<li><span class="label">Country: </span>[% B_country %]</li>[% END %]
[% IF Koha.Preference( 'AddressFormat' ) %]
[% INCLUDE "member-display-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
[% ELSE %]
[% INCLUDE 'member-display-alt-address-style-us.inc' %]
[% END %]
<div class="rows"> <ol>
[% IF ( B_phone ) %]<li><span class="label">Phone: </span><a href="tel:[% B_phone %]">[% B_phone %]</a></li>[% END %]
[% IF ( B_email ) %]<li class="email"><span class="label">Email: </span><a title="[% B_email %]" href="mailto:[% B_email %]">[% B_email %]</a></li>[% END %]
[% IF ( contactnote ) %]<li><span class="label">Contact note: </span> [% contactnote %]</li>[% END %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment