Bugzilla – Attachment 105745 Details for
Bug 25070
Include files to display address and contact must be refactored
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25070: Centralize member-alt-address-style
Bug-25070-Centralize-member-alt-address-style.patch (text/plain), 35.24 KB, created by
Katrin Fischer
on 2020-06-11 12:42:39 UTC
(
hide
)
Description:
Bug 25070: Centralize member-alt-address-style
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-06-11 12:42:39 UTC
Size:
35.24 KB
patch
obsolete
>From 8c7efd514178f07fdd3c2e43bed78819d9e7a9b2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Apr 2020 13:53:17 +0200 >Subject: [PATCH] Bug 25070: Centralize member-alt-address-style > >There are 5 includes files per value of AddressFormat (us, de, fr). >The code is duplicated for each language, the only thing that changes is the order. > >Wwith this patchset we are going to refactore them to avoid further regressions. > >The idea is to remove all code that is duplicated and remove the need of >having 5*3 files. We are going to limit them to 5 files, 1 per use. > >Note that we could go even further, for instance >member-display-alt-address-style and member-display-address-style are >quite identical. > >Test plan (for the whole patchset): >- Create a patron with all the address, contact and alternate info filled >- Edit them and save >- Look at the patron's info (top left) in the patron module, and the >patron detail view. >- Play with the different values of AddressFormat >The order and the info must be displayed identically before and after >this patchset. No change is expected. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../en/includes/member-alt-address-style-de.inc | 162 -------------- > .../en/includes/member-alt-address-style-fr.inc | 162 -------------- > .../en/includes/member-alt-address-style-us.inc | 160 -------------- > .../prog/en/includes/member-alt-address-style.inc | 244 +++++++++++++++++++++ > .../prog/en/modules/members/memberentrygen.tt | 7 +- > 5 files changed, 246 insertions(+), 489 deletions(-) > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc >deleted file mode 100644 >index 82532998ab..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc >+++ /dev/null >@@ -1,162 +0,0 @@ >- <fieldset class="rows" id="memberentry_address"> >- <legend id="alt_address_lgd">Alternate address</legend><ol> >- >- [% IF roadtypes %] >- <li> >- [% IF ( mandatoryB_streettype ) %] >- <label for="B_streettype" class="required"> >- [% ELSE %] >- <label for="B_streettype"> >- [% END %] >- Street type: </label> >- <select name="B_streettype"> >- <option value=""></option> >- [% FOR roadtype IN roadtypes %] >- [% IF roadtype.authorised_value == patron.B_streettype %] >- <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option> >- [% ELSE %] >- <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option> >- [% END %] >- [% END %] >- </select> >- [% IF ( mandatoryB_streettype ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- >- [% UNLESS noB_address %] >- <li> >- [% IF ( mandatoryB_address ) %] >- <label for="B_address" class="required"> >- [% ELSE %] >- <label for="B_address"> >- [% END %] >- Address: </label> >- <input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" /> >- [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- >- [% UNLESS noB_streetnumber %] >- <li> >- [% IF ( mandatoryB_streetnumber ) %] >- <label for="B_streetnumber" class="required"> >- [% ELSE %] >- <label for="B_streetnumber"> >- [% END %] >- Street Number: </label> >- <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% patron.B_streetnumber | html %]" /> >- [% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- >- [% UNLESS noB_address2 %] >- <li> >- [% IF ( mandatoryB_address2 ) %] >- <label for="B_address2" class="required"> >- [% ELSE %] >- <label for="B_address2"> >- [% END %] >- Address 2: </label> >- <input type="text" id="B_address2" name="B_address2" size="40" value="[% patron.B_address2 | html %]" /> >- [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_zipcode %] >- <li> >- [% IF ( mandatoryB_zipcode ) %] >- <label for="B_zipcode" class="required"> >- [% ELSE %] >- <label for="B_zipcode"> >- [% END %] >- ZIP/Postal code: </label> >- <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% patron.B_zipcode | html %]" /> >- [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_city %] >- <li> >- [% IF ( mandatoryB_city ) %] >- <label for="B_city" class="required" > >- [% ELSE %] >- <label for="B_city"> >- [% END %] >- City: </label> >- <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" /> >- [% IF cities.count %]or choose >- <select class="select_city" data-addressfield="B_" name="select_city"> >- <option value="|||"></option> >- [% FOREACH c IN cities %] >- [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_zipcode %] >- <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected"> >- [% ELSE %] >- <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]"> >- [% END %] >- [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %] >- </option> >- [% END %] >- </select> >- [% END %] >- [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_state %] >- <li> >- [% IF ( mandatoryB_state ) %] >- <label for="B_state" class="required" > >- [% ELSE %] >- <label for="B_state"> >- [% END %] >- State: </label> >- <input type="text" id="B_state" name="B_state" size="20" value="[% patron.B_state | html %]" /> >- [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_country %] >- <li> >- [% IF ( mandatoryB_country ) %] >- <label for="B_country" class="required"> >- [% ELSE %] >- <label for="B_country"> >- [% END %] >- Country: </label> >- <input type="text" id="B_country" name="B_country" size="20" value="[% patron.B_country | html %]" /> >- [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_phone %] >- <li> >- [% IF ( mandatoryB_phone ) %] >- <label for="B_phone" class="required"> >- [% ELSE %] >- <label for="B_phone"> >- [% END %] >- Phone: </label> >- <input type="text" id="B_phone" name="B_phone" value="[% patron.B_phone | html %]" /> >- [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_email %] >- <li> >- [% IF ( mandatoryB_email ) %] >- <label for="B_email" class="required"> >- [% ELSE %] >- <label for="B_email"> >- [% END %] >- Email: </label> >- <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" /> >- [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li> >- [% END %] >- [% UNLESS nocontactnote %] >- <li> >- [% IF ( mandatorycontactnote ) %] >- <label for="contactnote" class="required"> >- [% ELSE %] >- <label for="contactnote"> >- [% END %] >- Contact note: </label> >- <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% patron.contactnote | html %]</textarea> >- [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- </ol> >- </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc >deleted file mode 100644 >index 6f376e4771..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc >+++ /dev/null >@@ -1,162 +0,0 @@ >-<fieldset class="rows" id="memberentry_address"> >-<legend id="alt_address_lgd">Alternate address</legend><ol> >- >-[% UNLESS noB_streetnumber %] >- <li> >- [% IF ( mandatoryB_streetnumber ) %] >- <label for="B_streetnumber" class="required"> >- [% ELSE %] >- <label for="B_streetnumber"> >- [% END %] >- Street Number: </label> >- <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% patron.B_streetnumber | html %]" /> >- [% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >- >-[% IF roadtypes %] >- <li> >- [% IF ( mandatoryB_streettype ) %] >- <label for="B_streettype" class="required"> >- [% ELSE %] >- <label for="B_streettype"> >- [% END %] >- Street type: </label> >- <select name="B_streettype"> >- <option value=""></option> >- [% FOR roadtype IN roadtypes %] >- [% IF roadtype.authorised_value == patron.B_streettype %] >- <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option> >- [% ELSE %] >- <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option> >- [% END %] >- [% END %] >- </select> >- [% IF ( mandatoryB_streettype ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >- >-[% UNLESS noB_address %] >- <li> >- [% IF ( mandatoryB_address ) %] >- <label for="B_address" class="required"> >- [% ELSE %] >- <label for="B_address"> >- [% END %] >- Address: </label> >- <input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" /> >- [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >- >-[% UNLESS noB_address2 %] >- <li> >- [% IF ( mandatoryB_address2 ) %] >- <label for="B_address2" class="required"> >- [% ELSE %] >- <label for="B_address2"> >- [% END %] >- Address 2: </label> >- <input type="text" id="B_address2" name="B_address2" size="40" value="[% patron.B_address2 | html %]" /> >- [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >-[% UNLESS noB_zipcode %] >- <li> >- [% IF ( mandatoryB_zipcode ) %] >- <label for="B_zipcode" class="required"> >- [% ELSE %] >- <label for="B_zipcode"> >- [% END %] >- ZIP/Postal code: </label> >- <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% patron.B_zipcode | html %]" /> >- [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >-[% UNLESS noB_city %] >- <li> >- [% IF ( mandatoryB_city ) %] >- <label for="B_city" class="required" > >- [% ELSE %] >- <label for="B_city"> >- [% END %] >- City: </label> >- <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" /> >- [% IF cities.count %]or choose >- <select class="select_city" data-addressfield="B_" name="select_city"> >- <option value="|||"></option> >- [% FOREACH c IN cities %] >- [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_zipcode %] >- <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected"> >- [% ELSE %] >- <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]"> >- [% END %] >- [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %] >- </option> >- [% END %] >- </select> >- [% END %] >- [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >-[% UNLESS noB_state %] >- <li> >- [% IF ( mandatoryB_state ) %] >- <label for="B_state" class="required" > >- [% ELSE %] >- <label for="B_state"> >- [% END %] >- State: </label> >- <input type="text" id="B_state" name="B_state" size="20" value="[% patron.B_state | html %]" /> >- [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >-[% UNLESS noB_country %] >- <li> >- [% IF ( mandatoryB_country ) %] >- <label for="B_country" class="required"> >- [% ELSE %] >- <label for="B_country"> >- [% END %] >- Country: </label> >- <input type="text" id="B_country" name="B_country" size="20" value="[% patron.B_country | html %]" /> >- [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >-[% UNLESS noB_phone %] >- <li> >- [% IF ( mandatoryB_phone ) %] >- <label for="B_phone" class="required"> >- [% ELSE %] >- <label for="B_phone"> >- [% END %] >- Phone: </label> >- <input type="text" id="B_phone" name="B_phone" value="[% patron.B_phone | html %]" /> >- [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %] >- </li> >-[% END %] >-[% UNLESS noB_email %] >- <li> >- [% IF ( mandatoryB_email ) %] >- <label for="B_email" class="required"> >- [% ELSE %] >- <label for="B_email"> >- [% END %] >- Email: </label> >- <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" /> >- [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li> >-[% END %] >-[% UNLESS nocontactnote %] >- <li> >- [% IF ( mandatorycontactnote ) %] >- <label for="contactnote" class="required"> >- [% ELSE %] >- <label for="contactnote"> >- [% END %] >- Contact note: </label> >- <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% patron.contactnote | html %]</textarea> >- [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >-</ol> >-</fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc >deleted file mode 100644 >index ec3d6e274c..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc >+++ /dev/null >@@ -1,160 +0,0 @@ >- <fieldset class="rows" id="memberentry_address"> >- <legend id="alt_address_lgd">Alternate address</legend><ol> >- [% UNLESS noB_streetnumber %] >- <li> >- [% IF ( mandatoryB_streetnumber ) %] >- <label for="B_streetnumber" class="required"> >- [% ELSE %] >- <label for="B_streetnumber"> >- [% END %] >- Street Number: </label> >- <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% patron.B_streetnumber | html %]" /> >- [% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- >- [% IF roadtypes %] >- <li> >- [% IF ( mandatoryB_streettype ) %] >- <label for="B_streettype" class="required"> >- [% ELSE %] >- <label for="B_streettype"> >- [% END %] >- Street type: </label> >- <select name="B_streettype"> >- <option value=""></option> >- [% FOR roadtype IN roadtypes %] >- [% IF roadtype.authorised_value == patron.B_streettype %] >- <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option> >- [% ELSE %] >- <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option> >- [% END %] >- [% END %] >- </select> >- [% IF ( mandatoryB_streettype ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- >- [% UNLESS noB_address %] >- <li> >- [% IF ( mandatoryB_address ) %] >- <label for="B_address" class="required"> >- [% ELSE %] >- <label for="B_address"> >- [% END %] >- Address: </label> >- <input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" /> >- [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_address2 %] >- <li> >- [% IF ( mandatoryB_address2 ) %] >- <label for="B_address2" class="required"> >- [% ELSE %] >- <label for="B_address2"> >- [% END %] >- Address 2: </label> >- <input type="text" id="B_address2" name="B_address2" size="40" value="[% patron.B_address2 | html %]" /> >- [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_city %] >- <li> >- [% IF ( mandatoryB_city ) %] >- <label for="B_city" class="required" > >- [% ELSE %] >- <label for="B_city"> >- [% END %] >- City: </label> >- <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" /> >- [% IF cities.count %]or choose >- <select class="select_city" data-addressfield="B_" name="select_city"> >- <option value="|||"></option> >- [% FOREACH c IN cities %] >- [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_zipcode %] >- <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected"> >- [% ELSE %] >- <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]"> >- [% END %] >- [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %] >- </option> >- [% END %] >- </select> >- [% END %] >- [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_state %] >- <li> >- [% IF ( mandatoryB_state ) %] >- <label for="B_state" class="required" > >- [% ELSE %] >- <label for="B_state"> >- [% END %] >- State: </label> >- <input type="text" id="B_state" name="B_state" size="20" value="[% patron.B_state | html %]" /> >- [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_zipcode %] >- <li> >- [% IF ( mandatoryB_zipcode ) %] >- <label for="B_zipcode" class="required"> >- [% ELSE %] >- <label for="B_zipcode"> >- [% END %] >- ZIP/Postal code: </label> >- <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% patron.B_zipcode | html %]" /> >- [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_country %] >- <li> >- [% IF ( mandatoryB_country ) %] >- <label for="B_country" class="required"> >- [% ELSE %] >- <label for="B_country"> >- [% END %] >- Country: </label> >- <input type="text" id="B_country" name="B_country" size="20" value="[% patron.B_country | html %]" /> >- [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_phone %] >- <li> >- [% IF ( mandatoryB_phone ) %] >- <label for="B_phone" class="required"> >- [% ELSE %] >- <label for="B_phone"> >- [% END %] >- Phone: </label> >- <input type="text" id="B_phone" name="B_phone" value="[% patron.B_phone | html %]" /> >- [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- [% UNLESS noB_email %] >- <li> >- [% IF ( mandatoryB_email ) %] >- <label for="B_email" class="required"> >- [% ELSE %] >- <label for="B_email"> >- [% END %] >- Email: </label> >- <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" /> >- [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li> >- [% END %] >- [% UNLESS nocontactnote %] >- <li> >- [% IF ( mandatorycontactnote ) %] >- <label for="contactnote" class="required"> >- [% ELSE %] >- <label for="contactnote"> >- [% END %] >- Contact note: </label> >- <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% patron.contactnote | html %]</textarea> >- [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %] >- </li> >- [% END %] >- </ol> >- </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc >new file mode 100644 >index 0000000000..d50c8a8de3 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc >@@ -0,0 +1,244 @@ >+[% USE Koha %] >+[% BLOCK 'alt-address-style' %] >+ <fieldset class="rows" id="memberentry_address"> >+ <legend id="alt_address_lgd">Alternate address</legend> >+ <ol> >+ [% IF Koha.Preference( 'AddressFormat' ) %] >+ [% PROCESS "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }" %] >+ [% ELSE %] >+ [% PROCESS 'member-alt-address-style-us' %] >+ [% END %] >+ </ol> >+ </fieldset> >+[% END %] >+ >+[% BLOCK 'member-alt-address-style-us' %] >+ [% PROCESS 'alt-address-style_B_streetnumber' %] >+ [% PROCESS 'alt-address-style_roadtypes' %] >+ [% PROCESS 'alt-address-style_B_address' %] >+ [% PROCESS 'alt-address-style_B_address2' %] >+ [% PROCESS 'alt-address-style_B_city' %] >+ [% PROCESS 'alt-address-style_B_state' %] >+ [% PROCESS 'alt-address-style_B_zipcode' %] >+ [% PROCESS 'alt-address-style_B_country' %] >+ [% PROCESS 'alt-address-style_B_phone' %] >+ [% PROCESS 'alt-address-style_B_email' %] >+ [% PROCESS 'alt-address-style_B_contactnote' %] >+[% END %] >+ >+[% BLOCK 'member-alt-address-style-de' %] >+ [% PROCESS 'alt-address-style_roadtypes' %] >+ [% PROCESS 'alt-address-style_B_address' %] >+ [% PROCESS 'alt-address-style_B_streetnumber' %] >+ [% PROCESS 'alt-address-style_B_address2' %] >+ [% PROCESS 'alt-address-style_B_zipcode' %] >+ [% PROCESS 'alt-address-style_B_city' %] >+ [% PROCESS 'alt-address-style_B_state' %] >+ [% PROCESS 'alt-address-style_B_country' %] >+ [% PROCESS 'alt-address-style_B_phone' %] >+ [% PROCESS 'alt-address-style_B_email' %] >+ [% PROCESS 'alt-address-style_B_contactnote' %] >+[% END %] >+ >+[% BLOCK 'member-alt-address-style-fr' %] >+ [% PROCESS 'alt-address-style_B_streetnumber' %] >+ [% PROCESS 'alt-address-style_roadtypes' %] >+ [% PROCESS 'alt-address-style_B_address' %] >+ [% PROCESS 'alt-address-style_B_address2' %] >+ [% PROCESS 'alt-address-style_B_zipcode' %] >+ [% PROCESS 'alt-address-style_B_city' %] >+ [% PROCESS 'alt-address-style_B_state' %] >+ [% PROCESS 'alt-address-style_B_country' %] >+ [% PROCESS 'alt-address-style_B_phone' %] >+ [% PROCESS 'alt-address-style_B_email' %] >+ [% PROCESS 'alt-address-style_B_contactnote' %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_roadtypes' %] >+ [% IF roadtypes %] >+ <li> >+ [% IF ( mandatoryB_streettype ) %] >+ <label for="B_streettype" class="required"> >+ [% ELSE %] >+ <label for="B_streettype"> >+ [% END %] >+ Street type: </label> >+ <select name="B_streettype"> >+ <option value=""></option> >+ [% FOR roadtype IN roadtypes %] >+ [% IF roadtype.authorised_value == patron.B_streettype %] >+ <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option> >+ [% ELSE %] >+ <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ [% IF ( mandatoryB_streettype ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_address' %] >+ [% UNLESS noB_address %] >+ <li> >+ [% IF ( mandatoryB_address ) %] >+ <label for="B_address" class="required"> >+ [% ELSE %] >+ <label for="B_address"> >+ [% END %] >+ Address: </label> >+ <input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" /> >+ [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_streetnumber' %] >+ [% UNLESS noB_streetnumber %] >+ <li> >+ [% IF ( mandatoryB_streetnumber ) %] >+ <label for="B_streetnumber" class="required"> >+ [% ELSE %] >+ <label for="B_streetnumber"> >+ [% END %] >+ Street Number: </label> >+ <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% patron.B_streetnumber | html %]" /> >+ [% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_address2' %] >+ [% UNLESS noB_address2 %] >+ <li> >+ [% IF ( mandatoryB_address2 ) %] >+ <label for="B_address2" class="required"> >+ [% ELSE %] >+ <label for="B_address2"> >+ [% END %] >+ Address 2: </label> >+ <input type="text" id="B_address2" name="B_address2" size="40" value="[% patron.B_address2 | html %]" /> >+ [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_zipcode' %] >+ [% UNLESS noB_zipcode %] >+ <li> >+ [% IF ( mandatoryB_zipcode ) %] >+ <label for="B_zipcode" class="required"> >+ [% ELSE %] >+ <label for="B_zipcode"> >+ [% END %] >+ ZIP/Postal code: </label> >+ <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% patron.B_zipcode | html %]" /> >+ [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_city' %] >+ [% UNLESS noB_city %] >+ <li> >+ [% IF ( mandatoryB_city ) %] >+ <label for="B_city" class="required" > >+ [% ELSE %] >+ <label for="B_city"> >+ [% END %] >+ City: </label> >+ <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" /> >+ [% IF cities.count %] >+ or choose >+ <select class="select_city" data_addressfield="B_" name="select_city"> >+ <option value="|||"></option> >+ [% FOREACH c IN cities %] >+ [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_zipcode %] >+ <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected"> >+ [% ELSE %] >+ <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]"> >+ [% END %] >+ [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %] >+ </option> >+ [% END %] >+ </select> >+ [% END %] >+ [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_state' %] >+ [% UNLESS noB_state %] >+ <li> >+ [% IF ( mandatoryB_state ) %] >+ <label for="B_state" class="required" > >+ [% ELSE %] >+ <label for="B_state"> >+ [% END %] >+ State: </label> >+ <input type="text" id="B_state" name="B_state" size="20" value="[% patron.B_state | html %]" /> >+ [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_country' %] >+ [% UNLESS noB_country %] >+ <li> >+ [% IF ( mandatoryB_country ) %] >+ <label for="B_country" class="required"> >+ [% ELSE %] >+ <label for="B_country"> >+ [% END %] >+ Country: </label> >+ <input type="text" id="B_country" name="B_country" size="20" value="[% patron.B_country | html %]" /> >+ [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_phone' %] >+ [% UNLESS noB_phone %] >+ <li> >+ [% IF ( mandatoryB_phone ) %] >+ <label for="B_phone" class="required"> >+ [% ELSE %] >+ <label for="B_phone"> >+ [% END %] >+ Phone: </label> >+ <input type="text" id="B_phone" name="B_phone" value="[% patron.B_phone | html %]" /> >+ [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_email' %] >+ [% UNLESS noB_email %] >+ <li> >+ [% IF ( mandatoryB_email ) %] >+ <label for="B_email" class="required"> >+ [% ELSE %] >+ <label for="B_email"> >+ [% END %] >+ Email: </label> >+ <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" /> >+ [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK 'alt-address-style_B_contactnote' %] >+ [% UNLESS nocontactnote %] >+ <li> >+ [% IF ( mandatorycontactnote ) %] >+ <label for="contactnote" class="required"> >+ [% ELSE %] >+ <label for="contactnote"> >+ [% END %] >+ Contact note: </label> >+ <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% patron.contactnote | html %]</textarea> >+ [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %] >+ </li> >+ [% END %] >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 8cc1c9ec00..f42aeff396 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -5,6 +5,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >+[% PROCESS 'member-alt-address-style.inc' %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Patrons › >@@ -739,11 +740,7 @@ legend:hover { > > [% IF ( step_6 ) %] > [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %] >- [% IF Koha.Preference( 'AddressFormat' ) %] >- [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] >- [% ELSE %] >- [% INCLUDE 'member-alt-address-style-us.inc' %] >- [% END %] >+ [% PROCESS 'alt-address-style' %] > [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] > [% END # /IF ( step_6 ) %] > >-- >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 25070
:
102439
|
102440
|
102441
|
102442
|
102443
|
102477
|
102478
|
102479
|
102480
|
102481
|
102487
|
102488
|
102489
|
102490
|
102491
|
104562
|
104563
|
104564
|
104565
|
104566
|
104581
|
104582
|
104583
|
104584
|
104585
|
104659
|
104660
|
104661
|
104662
|
104663
| 105745 |
105746
|
105747
|
105748
|
105749
|
105750