Bug 3766: Cities/Towns only on one address
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / includes / member-main-address-style-us.inc
1 <fieldset class="rows" id="memberentry_mainaddress">
2     <legend id="main_address_lgd">Main address</legend><ol>
3         [% UNLESS nostreetnumber %]
4     <li>
5       [% IF ( mandatorystreetnumber ) %]
6       <label for="streetnumber" class="required">
7       [% ELSE %]
8       <label for="streetnumber">
9       [% END %]
10       Street number: </label>
11         <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% patron.streetnumber | html %]" />
12 [% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
13     </li>
14         [% END %]
15         [% UNLESS nostreettype %]
16     [% IF roadtypes %]
17       <li>
18       [% IF ( mandatorystreettype ) %]
19       <label for="streettype" class="required">
20       [% ELSE %]
21       <label for="streettype">
22       [% END %]
23       Street type: </label>
24       <select name="streettype">
25         <option value=""></option>
26         [% FOR roadtype IN roadtypes %]
27           [% IF roadtype.authorised_value == patron.streettype %]
28             <option value="[% roadtype.authorised_value | html %]" selected="selected">[% roadtype.lib | html %]</option>
29           [% ELSE %]
30             <option value="[% roadtype.authorised_value | html %]">[% roadtype.lib | html %]</option>
31           [% END %]
32         [% END %]
33       </select>
34       [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
35       </li>
36     [% END %]
37         [% END %]
38         [% UNLESS noaddress %]
39     <li>
40       [% IF ( mandatoryaddress ) %]
41       <label for="address" class="required">
42       [% ELSE %]
43       <label for="address">
44       [% END %]
45       Address: </label>
46             <input type="text" id="address" name="address" size="35" value="[% patron.address | html %]" />
47       [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
48     </li>
49         [% END %]
50         [% UNLESS noaddress2 %]
51     <li>
52       [% IF ( mandatoryaddress2 ) %]
53       <label for="address2" class="required">
54       [% ELSE %]
55       <label for="address2">
56       [% END %]
57       Address 2: </label>
58             <input type="text" id="address2" name="address2" size="35" value="[% patron.address2 | html %]" />
59       [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
60     </li>
61         [% END %]
62         [% UNLESS nocity %]
63     <li>
64       [% IF ( mandatorycity ) %]
65         <label for="city" class="required">
66       [% ELSE %]
67         <label for="city">
68       [% END %]
69       City: </label>
70         <input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
71         [% IF cities.count %]or choose
72         <select class="select_city" data-addressfield="" name="select_city">
73             <option value="|||"></option>
74             [% FOREACH c IN cities %]
75                 [% IF c.city_name == patron.city && c.city_state == patron.state && c.city_zipcode == patron.zipcode %]
76                 <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected">
77                 [% ELSE %]
78                 <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]">
79                 [% END %]
80                     [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %]
81                 </option>
82             [% END %]
83         </select>
84         [% END %]
85       [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
86     </li>
87         [% END %]
88         [% UNLESS nostate %]
89     <li>
90       [% IF ( mandatorystate ) %]
91         <label for="state" class="required">
92       [% ELSE %]
93         <label for="state">
94       [% END %]
95       State: </label>
96       <input type="text" name="state" id="state" size="20" value="[% patron.state | html %]" />
97       [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
98     </li>
99         [% END %]
100         [% UNLESS nozipcode %]
101     <li>
102       [% IF ( mandatoryzipcode ) %]
103         <label for="zipcode" class="required">
104       [% ELSE %]
105         <label for="zipcode">
106       [% END %]
107       ZIP/Postal code: </label>
108             <input type="text" name="zipcode" id="zipcode" size="10" value="[% patron.zipcode | html %]" />
109       [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
110     </li>
111         [% END %]
112         [% UNLESS nocountry %]
113     <li>
114       [% IF ( mandatorycountry ) %]
115         <label for="country" class="required">
116       [% ELSE %]
117         <label for="country">
118       [% END %]
119       Country: </label>
120         <input type="text" name="country" id="country" size="20" value="[% patron.country | html %]" />
121       [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
122     </li>
123         [% END %]
124     </ol>
125 </fieldset>