Bug 26538: Display cities list before input text

In patron creation or edition actually the city field is displayed with input text then cities list.
I propose to display cities list first since it is more likely used.

Test plan :
1) Create some cities
2) Open patron creation form
3) Check you see for each city field : cities list, text "or enter", text input
4) Delete all cities
5) Open patron creation form
6) Check you see for each city field : only text input

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5a66924914)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Fridolin Somers 2020-09-25 17:08:38 +02:00 committed by Lucas Gass
parent d3254f7e57
commit e6752ed581
3 changed files with 7 additions and 6 deletions

View File

@ -147,9 +147,7 @@
<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 %]
@ -162,7 +160,9 @@
</option>
[% END %]
</select>
<span class="hint">or enter</span>
[% END %]
<input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
[% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]

View File

@ -132,8 +132,7 @@
<label for="altcontactaddress3">
[% END %]
City:</label>
<input type="text" name="altcontactaddress3" id="altcontactcity" value="[% patron.altcontactaddress3 | html %]" size="20" />
[% IF cities.count %]or choose
[% IF cities.count %]
<select class="select_city" data-addressfield="altcontact" name="select_city">
<option value="|||"></option>
[% FOREACH c IN cities %]
@ -146,7 +145,9 @@
</option>
[% END %]
</select>
<span class="hint">or enter</span>
[% END %]
<input type="text" name="altcontactaddress3" id="altcontactcity" value="[% patron.altcontactaddress3 | html %]" size="20" />
[% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]

View File

@ -138,9 +138,7 @@
<label for="city">
[% END %]
City: </label>
<input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
[% IF cities.count %]
or choose
<select class="select_city" data-addressfield="" name="select_city">
<option value="|||"></option>
[% FOREACH c IN cities %]
@ -153,7 +151,9 @@
</option>
[% END %]
</select>
<span class="hint">or enter</span>
[% END %]
<input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
[% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]