Owen Leonard
83704cb1fa
This patch modifies the include files which contain the form fields for city, state, zipcode, etc. shown on the patron entry screen. The files are modified so that the city/state/zip <select> preselects a value based on city, state, and zipcode matching the values in the corresponding text fields. To test, confirm that the bug's steps to reproduce are fixed: - Enter two cities via Administration -> Patrons and circulation -> Cities and towns: Springfield, MA 01101 Springfield, VT 05156 - Edit a patron choosing, Springfield VT, and save. - Edit the patron again and confirm that the correct city is pre-selected. - Confirm this result with all three different settings of the "AddressFormat" system preference. Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
124 lines
4.3 KiB
HTML
124 lines
4.3 KiB
HTML
<fieldset class="rows" id="memberentry_mainaddress">
|
|
<legend id="main_address_lgd">Main address</legend><ol>
|
|
[% UNLESS nostreettype %]
|
|
[% UNLESS nostreetnumber %]
|
|
[% 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 %]
|
|
[% END %]
|
|
|
|
[% 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.authorised_value == streettype %]
|
|
<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 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 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 cities.count %]or choose
|
|
<select id="select_city" name="select_city">
|
|
<option value="|||"></option>
|
|
[% FOREACH c IN cities %]
|
|
[% IF c.city_name == city && c.city_state == state && c.city_zipcode == zipcode %]
|
|
<option value="[% c.city_zipcode %]|[% c.city_name %]|[% c.city_state %]|[% c.city_country %]" selected="selected">
|
|
[% ELSE %]
|
|
<option value="[% c.city_zipcode %]|[% c.city_name %]|[% c.city_state %]|[% c.city_country %]">
|
|
[% END %]
|
|
[% c.city_name %] [% c.city_state %] [% c.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 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>
|