From 114d516330cf074c8227cda313d99d2c88929e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> Date: Tue, 17 Feb 2015 22:36:45 +0100 Subject: [PATCH] Bug 4041 - First step (staff interface): Extract address blocks to include files This patch extracts the address blocks in memberentrygen.tt to include files. To test: The overall functionality should remain the same with this patch. In further steps, more country- or region-dependent includes could be added, along with functionality to select them using a system preference. --- .../en/includes/member-alt-address-style-us.inc | 112 +++++++ .../en/includes/member-alt-contact-style-us.inc | 112 +++++++ .../en/includes/member-main-address-style-us.inc | 124 +++++++ .../prog/en/modules/members/memberentrygen.tt | 350 +------------------- 4 files changed, 351 insertions(+), 347 deletions(-) create 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-contact-style-us.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc 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 new file mode 100644 index 0000000..21d000d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc @@ -0,0 +1,112 @@ + <fieldset class="rows" id="memberentry_address"> + <legend id="alt_address_lgd">Alternate address</legend><ol> + [% 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="[% B_address %]" /> + [% 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="[% B_address2 %]" /> + [% 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="[% B_city %]" /> + [% 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="[% B_state %]" /> + [% 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="[% B_zipcode %]" /> + [% 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="[% B_country %]" /> + [% 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="[% B_phone %]" /> + [% 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="[% B_email %]" /> + [% 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">[% contactnote %]</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-contact-style-us.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-us.inc new file mode 100644 index 0000000..3851891 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-us.inc @@ -0,0 +1,112 @@ + <fieldset class="rows" id="memberentry_altaddress"> + <legend id="alt_contact_lgd">Alternate contact</legend><ol> + [% UNLESS noaltcontactsurname %] + <li> + [% IF ( mandatoryaltcontactsurname ) %] + <label for="altcontactsurname" class="required"> + [% ELSE %] + <label for="altcontactsurname"> + [% END %] + Surname:</label> + <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" /> + [% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactfirstname %] + <li> + [% IF ( mandatoryaltcontactfirstname ) %] + <label for="altcontactfirstname" class="required"> + [% ELSE %] + <label for="altcontactfirstname"> + [% END %] + First name:</label> + <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" /> + [% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactaddress1 %] + <li> + [% IF ( mandatoryaltcontactaddress1 ) %] + <label for="altcontactaddress1" class="required"> + [% ELSE %] + <label for="altcontactaddress1"> + [% END %] + Address:</label> + <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" /> + [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactaddress2 %] + <li> + [% IF ( mandatoryaltcontactaddress2 ) %] + <label for="altcontactaddress2" class="required"> + [% ELSE %] + <label for="altcontactaddress2"> + [% END %] + Address 2:</label> + <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" size="40" /> + [% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactaddress3 %] + <li> + [% IF ( mandatoryaltcontactaddress3 ) %] + <label for="altcontactaddress3" class="required"> + [% ELSE %] + <label for="altcontactaddress3"> + [% END %] + City:</label> + <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" /> + [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactstate %] + <li> + [% IF ( mandatoryaltcontactstate ) %] + <label for="altcontactstate" class="required"> + [% ELSE %] + <label for="altcontactstate"> + [% END %] + State:</label> + <input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" /> + [% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactzipcode %] + <li> + [% IF ( mandatoryaltcontactzipcode ) %] + <label for="altcontactzipcode" class="required"> + [% ELSE %] + <label for="altcontactzipcode"> + [% END %] + Zip/Postal code:</label> + <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" /> + [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactcountry %] + <li> + [% IF ( mandatoryaltcontactcountry ) %] + <label for="altcontactcountry" class="required"> + [% ELSE %] + <label for="altcontactcountry"> + [% END %] + Country:</label> + <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" size="20" /> + [% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaltcontactphone %] + <li> + [% IF ( mandatoryaltcontactphone ) %] + <label for="altcontactphone" class="required"> + [% ELSE %] + <label for="altcontactphone"> + [% END %] + Phone:</label> + <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" /> + [% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + </ol> + </fieldset> diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc new file mode 100644 index 0000000..c2c640a --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc @@ -0,0 +1,124 @@ +<fieldset class="rows" id="memberentry_mainaddress"> + <legend id="main_address_lgd">Main address</legend><ol> + [% UNLESS nostreetnumber %] + <li> + [% IF ( mandatorystreetnumber ) %] + <label for="streetnumber" class="required"> + [% ELSE %] + <label for="streetnumber"> + [% END %] + Street number: </label> + <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" /> +[% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS nostreettype %] + [% IF roadtypes %] + <li> + [% IF ( mandatorystreettype ) %] + <label for="streettype" class="required"> + [% ELSE %] + <label for="streettype"> + [% END %] + Street type: </label> + <select name="streettype"> + <option value=""></option> + [% FOR roadtype IN roadtypes %] + [% IF roadtype.selected %] + <option value="[% roadtype.authorised_value %]" selected="selected">[% roadtype.lib %]</option> + [% ELSE %] + <option value="[% roadtype.authorised_value %]">[% roadtype.lib %]</option> + [% END %] + [% END %] + </select> + [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% END %] + [% UNLESS noaddress %] + <li> + [% IF ( mandatoryaddress ) %] + <label for="address" class="required"> + [% ELSE %] + <label for="address"> + [% END %] + Address: </label> + <input type="text" id="address" name="address" size="35" value="[% address %]" /> + [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS noaddress2 %] + <li> + [% IF ( mandatoryaddress2 ) %] + <label for="address2" class="required"> + [% ELSE %] + <label for="address2"> + [% END %] + Address 2: </label> + <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" /> + [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS nocity %] + <li> + [% IF ( mandatorycity ) %] + <label for="city" class="required"> + [% ELSE %] + <label for="city"> + [% END %] + City: </label> + <input type="text" id="city" name="city" size="20" value="[% city %]" /> + [% IF ( city_cgipopup ) %]or <strong>choose</strong> + <select id="select_city" name="select_city"> + [% FOREACH city_loo IN city_loop %] + [% IF ( city_loo.selected ) %] + <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected"> + [% ELSE %] + <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]"> + [% END %] + [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %] + </option> + [% END %] + </select> + [% END %] + [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS nostate %] + <li> + [% IF ( mandatorystate ) %] + <label for="state" class="required"> + [% ELSE %] + <label for="state"> + [% END %] + State: </label> + <input type="text" name="state" id="state" size="20" value="[% state %]" /> + [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS nozipcode %] + <li> + [% IF ( mandatoryzipcode ) %] + <label for="zipcode" class="required"> + [% ELSE %] + <label for="zipcode"> + [% END %] + Zip/Postal code: </label> + <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" /> + [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + [% UNLESS nocountry %] + <li> + [% IF ( mandatorycountry ) %] + <label for="country" class="required"> + [% ELSE %] + <label for="country"> + [% END %] + Country: </label> + <input type="text" name="country" id="country" size="20" value="[% country %]" /> + [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %] + </li> + [% END %] + </ol> +</fieldset> 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 b10ac47..2c41a5c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -433,130 +433,7 @@ [% END %] [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] -<fieldset class="rows" id="memberentry_mainaddress"> - <legend id="main_address_lgd">Main address</legend><ol> - [% UNLESS nostreetnumber %] - <li> - [% IF ( mandatorystreetnumber ) %] - <label for="streetnumber" class="required"> - [% ELSE %] - <label for="streetnumber"> - [% END %] - Street number: </label> - <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" /> -[% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS nostreettype %] - [% IF roadtypes %] - <li> - [% IF ( mandatorystreettype ) %] - <label for="streettype" class="required"> - [% ELSE %] - <label for="streettype"> - [% END %] - Street type: </label> - <select name="streettype"> - <option value=""></option> - [% FOR roadtype IN roadtypes %] - [% IF roadtype.selected %] - <option value="[% roadtype.authorised_value %]" selected="selected">[% roadtype.lib %]</option> - [% ELSE %] - <option value="[% roadtype.authorised_value %]">[% roadtype.lib %]</option> - [% END %] - [% END %] - </select> - [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% END %] - [% UNLESS noaddress %] - <li> - [% IF ( mandatoryaddress ) %] - <label for="address" class="required"> - [% ELSE %] - <label for="address"> - [% END %] - Address: </label> - <input type="text" id="address" name="address" size="35" value="[% address %]" /> - [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaddress2 %] - <li> - [% IF ( mandatoryaddress2 ) %] - <label for="address2" class="required"> - [% ELSE %] - <label for="address2"> - [% END %] - Address 2: </label> - <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" /> - [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS nocity %] - <li> - [% IF ( mandatorycity ) %] - <label for="city" class="required"> - [% ELSE %] - <label for="city"> - [% END %] - City: </label> - <input type="text" id="city" name="city" size="20" value="[% city %]" /> - [% IF ( city_cgipopup ) %]or <strong>choose</strong> - <select id="select_city" name="select_city"> - [% FOREACH city_loo IN city_loop %] - [% IF ( city_loo.selected ) %] - <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected"> - [% ELSE %] - <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]"> - [% END %] - [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %] - </option> - [% END %] - </select> - [% END %] - [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS nostate %] - <li> - [% IF ( mandatorystate ) %] - <label for="state" class="required"> - [% ELSE %] - <label for="state"> - [% END %] - State: </label> - <input type="text" name="state" id="state" size="20" value="[% state %]" /> - [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS nozipcode %] - <li> - [% IF ( mandatoryzipcode ) %] - <label for="zipcode" class="required"> - [% ELSE %] - <label for="zipcode"> - [% END %] - Zip/Postal code: </label> - <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" /> - [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS nocountry %] - <li> - [% IF ( mandatorycountry ) %] - <label for="country" class="required"> - [% ELSE %] - <label for="country"> - [% END %] - Country: </label> - <input type="text" name="country" id="country" size="20" value="[% country %]" /> - [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - </ol> - </fieldset> +[% INCLUDE 'member-main-address-style-us.inc' %] [% END # nostreet && nocity etc group%] [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] @@ -645,233 +522,12 @@ [% IF ( step_6 ) %] [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %] - <fieldset class="rows" id="memberentry_address"> - <legend id="alt_address_lgd">Alternate address</legend><ol> - [% 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="[% B_address %]" /> - [% 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="[% B_address2 %]" /> - [% 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="[% B_city %]" /> - [% 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="[% B_state %]" /> - [% 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="[% B_zipcode %]" /> - [% 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="[% B_country %]" /> - [% 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="[% B_phone %]" /> - [% 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="[% B_email %]" /> - [% 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">[% contactnote %]</textarea> - [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - </ol> - </fieldset> +[% INCLUDE 'member-alt-address-style-us.inc' %] [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] [% END %] [% IF ( step_2 ) %] [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %] - <fieldset class="rows" id="memberentry_altaddress"> - <legend id="alt_contact_lgd">Alternate contact</legend><ol> - [% UNLESS noaltcontactsurname %] - <li> - [% IF ( mandatoryaltcontactsurname ) %] - <label for="altcontactsurname" class="required"> - [% ELSE %] - <label for="altcontactsurname"> - [% END %] - Surname:</label> - <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" /> - [% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactfirstname %] - <li> - [% IF ( mandatoryaltcontactfirstname ) %] - <label for="altcontactfirstname" class="required"> - [% ELSE %] - <label for="altcontactfirstname"> - [% END %] - First name:</label> - <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" /> - [% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactaddress1 %] - <li> - [% IF ( mandatoryaltcontactaddress1 ) %] - <label for="altcontactaddress1" class="required"> - [% ELSE %] - <label for="altcontactaddress1"> - [% END %] - Address:</label> - <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" /> - [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactaddress2 %] - <li> - [% IF ( mandatoryaltcontactaddress2 ) %] - <label for="altcontactaddress2" class="required"> - [% ELSE %] - <label for="altcontactaddress2"> - [% END %] - Address 2:</label> - <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" size="40" /> - [% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactaddress3 %] - <li> - [% IF ( mandatoryaltcontactaddress3 ) %] - <label for="altcontactaddress3" class="required"> - [% ELSE %] - <label for="altcontactaddress3"> - [% END %] - City:</label> - <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" /> - [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactstate %] - <li> - [% IF ( mandatoryaltcontactstate ) %] - <label for="altcontactstate" class="required"> - [% ELSE %] - <label for="altcontactstate"> - [% END %] - State:</label> - <input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" /> - [% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactzipcode %] - <li> - [% IF ( mandatoryaltcontactzipcode ) %] - <label for="altcontactzipcode" class="required"> - [% ELSE %] - <label for="altcontactzipcode"> - [% END %] - Zip/Postal code:</label> - <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" /> - [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactcountry %] - <li> - [% IF ( mandatoryaltcontactcountry ) %] - <label for="altcontactcountry" class="required"> - [% ELSE %] - <label for="altcontactcountry"> - [% END %] - Country:</label> - <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" size="20" /> - [% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - [% UNLESS noaltcontactphone %] - <li> - [% IF ( mandatoryaltcontactphone ) %] - <label for="altcontactphone" class="required"> - [% ELSE %] - <label for="altcontactphone"> - [% END %] - Phone:</label> - <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" /> - [% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %] - </li> - [% END %] - </ol> - </fieldset> +[% INCLUDE 'member-alt-contact-style-us.inc' %] [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %] [% END %] -- 1.7.10.4