Bug 3766: Cities/Towns only on one address
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / includes / member-alt-address-style-us.inc
1         <fieldset class="rows" id="memberentry_address">
2         <legend id="alt_address_lgd">Alternate address</legend><ol>
3         [% UNLESS noB_streetnumber %]
4             <li>
5                 [% IF ( mandatoryB_streetnumber ) %]
6                     <label for="B_streetnumber" class="required">
7                 [% ELSE %]
8                     <label for="B_streetnumber">
9                 [% END %]
10                 Street Number: </label>
11                 <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% patron.B_streetnumber | html %]" />
12                [% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %]
13             </li>
14         [% END %]
15
16         [% IF roadtypes %]
17                 <li>
18             [% IF ( mandatoryB_streettype ) %]
19                 <label for="B_streettype" class="required">
20             [% ELSE %]
21                 <label for="B_streettype">
22         [% END %]
23         Street type: </label>
24         <select name="B_streettype">
25         <option value=""></option>
26         [% FOR roadtype IN roadtypes %]
27             [% IF roadtype.authorised_value == patron.B_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 ( mandatoryB_streettype ) %]<span class="required">Required</span>[% END %]
35         </li>
36       [% END %]
37
38         [% UNLESS noB_address %]
39             <li>
40                 [% IF ( mandatoryB_address ) %]
41                     <label for="B_address" class="required">
42                 [% ELSE %]
43                     <label for="B_address">
44                 [% END %]
45                 Address: </label>
46                     <input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" />
47       [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
48             </li>
49         [% END %]
50         [% UNLESS noB_address2 %]
51             <li>
52                 [% IF ( mandatoryB_address2 ) %]
53                     <label for="B_address2" class="required">
54                 [% ELSE %]
55                     <label for="B_address2">
56                 [% END %]
57                 Address 2: </label>
58                     <input type="text" id="B_address2" name="B_address2" size="40" value="[% patron.B_address2 | html %]" />
59       [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
60             </li>
61         [% END %]
62         [% UNLESS noB_city %]
63             <li>
64                 [% IF ( mandatoryB_city ) %]
65                     <label for="B_city" class="required" >
66                 [% ELSE %]
67                     <label for="B_city">
68                 [% END %]
69                 City: </label>
70                 <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
71                 [% IF cities.count %]or choose
72                     <select class="select_city" data-addressfield="B_" name="select_city">
73                         <option value="|||"></option>
74                         [% FOREACH c IN cities %]
75                             [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_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 ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
86             </li>
87         [% END %]
88         [% UNLESS noB_state %]
89             <li>
90                 [% IF ( mandatoryB_state ) %]
91                     <label for="B_state" class="required" >
92                 [% ELSE %]
93                     <label for="B_state">
94                 [% END %]
95                 State: </label>
96                 <input type="text" id="B_state" name="B_state" size="20" value="[% patron.B_state | html %]" />
97       [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
98             </li>
99         [% END %]
100         [% UNLESS noB_zipcode %]
101             <li>
102                 [% IF ( mandatoryB_zipcode ) %]
103                     <label for="B_zipcode" class="required">
104                 [% ELSE %]
105                     <label for="B_zipcode">
106                 [% END %]
107                 ZIP/Postal code: </label>
108                     <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% patron.B_zipcode | html %]" />
109       [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
110             </li>
111         [% END %]
112         [% UNLESS noB_country %]
113             <li>
114                 [% IF ( mandatoryB_country ) %]
115                     <label for="B_country" class="required">
116                 [% ELSE %]
117                     <label for="B_country">
118                 [% END %]
119                 Country: </label>
120                     <input type="text" id="B_country" name="B_country" size="20" value="[% patron.B_country | html %]" />
121       [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
122             </li>
123         [% END %]
124         [% UNLESS noB_phone %]
125             <li>
126                 [% IF ( mandatoryB_phone ) %]
127                 <label for="B_phone" class="required">
128                 [% ELSE %]
129                 <label for="B_phone">
130                 [% END %]
131                 Phone: </label>
132                     <input type="text" id="B_phone" name="B_phone" value="[% patron.B_phone | html %]" />
133                 [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
134             </li>
135         [% END %]
136         [% UNLESS noB_email %]
137             <li>
138         [% IF ( mandatoryB_email ) %]
139           <label for="B_email" class="required">
140         [% ELSE %]
141           <label for="B_email">
142         [% END %]
143         Email: </label>
144             <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" />
145         [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
146         [% END %]
147         [% UNLESS nocontactnote %]
148             <li>
149                 [% IF ( mandatorycontactnote ) %]
150                 <label for="contactnote" class="required">
151                 [% ELSE %]
152                 <label for="contactnote">
153                 [% END %]
154                 Contact note: </label>
155                 <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% patron.contactnote | html %]</textarea>
156         [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
157             </li>
158         [% END %]
159             </ol>
160         </fieldset>