Commit 3e576f65 authored by Marc Véron's avatar Marc Véron Committed by Kyle M Hall

Bug 10760: Alternate Address: Make street number and street type editable

Table 'borrowers' contain columns B_streetnumber and B_streettype.
This patch makes them editable for alternate address.

To test:
- Apply patch
- Edit a patron's details
- Verify that in edit mode for Alternate address, the fields 'street type' and 'street number' appear
  and follow the settings in sysprefs AddressFormat, BorrowerMandatoryField, BorrowerUnwantedField
- Verify that the values are saved correctly.

Note: A second patch will follow to manage the display of street number and street type
Signed-off-by: default avatarOwen Leonard <oleonard@myacpl.org>
Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
parent df57c8e8
......@@ -12,6 +12,42 @@
[% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
[% IF roadtypes %]
<li>
[% IF ( mandatoryB_streettype ) %]
<label for="B_streettype" class="required">
[% ELSE %]
<label for="B_streettype">
[% END %]
Street type: </label>
<select name="B_streettype">
<option value=""></option>
[% FOR roadtype IN roadtypes %]
[% IF roadtype.authorised_value == B_streettype %]
<option value="[% roadtype.authorised_value %]" selected="selected">[% roadtype.lib %]</option>
[% ELSE %]
<option value="[% roadtype.authorised_value %]">[% roadtype.lib %]</option>
[% END %]
[% END %]
</select>
[% IF ( mandatoryB_streettype ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
[% UNLESS noB_streetnumber %]
<li>
[% IF ( mandatoryB_streetnumber ) %]
<label for="B_streetnumber" class="required">
[% ELSE %]
<label for="B_streetnumber">
[% END %]
Street Number: </label>
<input type="text" id="B_address" name="B_streetnumber" size="5" value="[% B_streetnumber %]" />
[% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
[% UNLESS noB_address2 %]
<li>
[% IF ( mandatoryB_address2 ) %]
......
<fieldset class="rows" id="memberentry_address">
<legend id="alt_address_lgd">Alternate address</legend><ol>
[% UNLESS noB_streetnumber %]
<li>
[% IF ( mandatoryB_streetnumber ) %]
<label for="B_streetnumber" class="required">
[% ELSE %]
<label for="B_streetnumber">
[% END %]
Street Number: </label>
<input type="text" id="B_address" name="B_streetnumber" size="5" value="[% B_streetnumber %]" />
[% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
[% IF roadtypes %]
<li>
[% IF ( mandatoryB_streettype ) %]
<label for="B_streettype" class="required">
[% ELSE %]
<label for="B_streettype">
[% END %]
Street type: </label>
<select name="B_streettype">
<option value=""></option>
[% FOR roadtype IN roadtypes %]
[% IF roadtype.authorised_value == B_streettype %]
<option value="[% roadtype.authorised_value %]" selected="selected">[% roadtype.lib %]</option>
[% ELSE %]
<option value="[% roadtype.authorised_value %]">[% roadtype.lib %]</option>
[% END %]
[% END %]
</select>
[% IF ( mandatoryB_streettype ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
[% UNLESS noB_address %]
<li>
[% IF ( mandatoryB_address ) %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment