Bug 41638: (follow-up) Fix more instances, some markup errors

I've added changes for member-alt-address-style.inc,
member-alt-contact-style.inc, and member-main-address-style.inc.

I've also made some related markup corrections: Missing ID on some
inputs, incorrect "for" label on some labels. These fixes don't correct
*all* validation errors but it's an improvement.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Owen Leonard 2026-01-22 13:36:36 -05:00 committed by Martin Renvoize
parent d8a2496888
commit ecbaf3b4d5
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
4 changed files with 40 additions and 40 deletions

View File

@ -63,8 +63,8 @@
[% IF roadtypes.count %]
[% UNLESS noB_streettype %]
<li>
<label for="B_streettype" [% IF mandatoryB_streettype %]class="required"[% END %]>Street type: </label>
<select name="B_streettype">
<label for="B_streettype" id="B_streettype_label" [% IF mandatoryB_streettype %]class="required"[% END %]>Street type: </label>
<select name="B_streettype" id="B_streettype">
<option value=""></option>
[% FOR roadtype IN roadtypes %]
[% IF roadtype.authorised_value == patron.B_streettype %]
@ -83,7 +83,7 @@
[% BLOCK 'alt-address-style_B_address' %]
[% UNLESS noB_address %]
<li>
<label for="B_address" [% IF mandatoryB_address %]class="required"[% END %]>Address: </label>
<label for="B_address" id="B_address_label" [% IF mandatoryB_address %]class="required"[% END %]>Address: </label>
<input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" />
[% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
</li>
@ -93,7 +93,7 @@
[% BLOCK 'alt-address-style_B_streetnumber' %]
[% UNLESS noB_streetnumber %]
<li>
<label for="B_streetnumber" [% IF mandatoryB_streetnumber %]class="required"[% END %]>Street number: </label>
<label for="B_streetnumber" id="B_streetnumber_label" [% IF mandatoryB_streetnumber %]class="required"[% END %]>Street number: </label>
<input type="text" id="B_streetnumber" name="B_streetnumber" value="[% patron.B_streetnumber | html %]" />
[% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %]
</li>
@ -103,7 +103,7 @@
[% BLOCK 'alt-address-style_B_address2' %]
[% UNLESS noB_address2 %]
<li>
<label for="B_address2" [% IF mandatoryB_address2 %]class="required"[% END %]>Address 2: </label>
<label for="B_address2" id="B_address2_label" [% IF mandatoryB_address2 %]class="required"[% END %]>Address 2: </label>
<input type="text" id="B_address2" name="B_address2" size="40" value="[% patron.B_address2 | html %]" />
[% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
</li>
@ -113,7 +113,7 @@
[% BLOCK 'alt-address-style_B_zipcode' %]
[% UNLESS noB_zipcode %]
<li>
<label for="B_zipcode" [% IF mandatoryB_zipcode %]class="required"[% END %]>ZIP/Postal code: </label>
<label for="B_zipcode" id="B_zipcode_label" [% IF mandatoryB_zipcode %]class="required"[% END %]>ZIP/Postal code: </label>
<input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% patron.B_zipcode | html %]" />
[% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
</li>
@ -123,7 +123,7 @@
[% BLOCK 'alt-address-style_B_city' %]
[% UNLESS noB_city %]
<li>
<label for="B_city" [% IF mandatoryB_city %]class="required"[% END %]>City: </label>
<label for="B_city" id="B_city_label" [% IF mandatoryB_city %]class="required"[% END %]>City: </label>
[% IF cities.count %]
<select class="select_city" data-addressfield="B_" name="select_city">
<option value="|||"></option>
@ -147,7 +147,7 @@
[% BLOCK 'alt-address-style_B_state' %]
[% UNLESS noB_state %]
<li>
<label for="B_state" [% IF mandatoryB_state %]class="required"[% END %]>State: </label>
<label for="B_state" id="B_state_label" [% IF mandatoryB_state %]class="required"[% END %]>State: </label>
<input type="text" id="B_state" name="B_state" size="20" value="[% patron.B_state | html %]" />
[% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
</li>
@ -157,7 +157,7 @@
[% BLOCK 'alt-address-style_B_country' %]
[% UNLESS noB_country %]
<li>
<label for="B_country" [% IF mandatoryB_country %]class="required"[% END %]>Country: </label>
<label for="B_country" id="B_country_label" [% IF mandatoryB_country %]class="required"[% END %]>Country: </label>
<input type="text" id="B_country" name="B_country" size="20" value="[% patron.B_country | html %]" />
[% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
</li>
@ -167,7 +167,7 @@
[% BLOCK 'alt-address-style_B_phone' %]
[% UNLESS noB_phone %]
<li>
<label for="B_phone" [% IF mandatoryB_phone %]class="required"[% END %]>Phone: </label>
<label for="B_phone" id="B_phone_label" [% IF mandatoryB_phone %]class="required"[% END %]>Phone: </label>
<input type="text" id="B_phone" name="B_phone" value="[% patron.B_phone | html %]" />
[% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
</li>
@ -177,7 +177,7 @@
[% BLOCK 'alt-address-style_B_email' %]
[% UNLESS noB_email %]
<li>
<label for="B_email" [% IF mandatoryB_email %]class="required"[% END %]>Email: </label>
<label for="B_email" id="B_email_label" [% IF mandatoryB_email %]class="required"[% END %]>Email: </label>
[% IF ( NoUpdateEmail ) %]
<input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" disabled="disabled" />
[% ELSE %]
@ -191,7 +191,7 @@
[% BLOCK 'alt-address-style_B_contactnote' %]
[% UNLESS nocontactnote %]
<li>
<label for="contactnote" [% IF mandatorycontactnote %]class="required"[% END %]>Contact note: </label>
<label for="contactnote" id="contactnote_label" [% IF mandatorycontactnote %]class="required"[% END %]>Contact note: </label>
<textarea id="contactnote" name="contactnote" cols="40" rows="2">[% patron.contactnote | html %]</textarea>
[% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
</li>

View File

@ -54,7 +54,7 @@
[% BLOCK 'alt-contact-style_altcontactsurname' %]
[% UNLESS noaltcontactsurname %]
<li>
<label for="altcontactsurname" [% IF mandatoryaltcontactsurname %]class="required"[% END %]>Surname: </label>
<label for="altcontactsurname" id="altcontactsurname_label" [% IF mandatoryaltcontactsurname %]class="required"[% END %]>Surname: </label>
<input type="text" name="altcontactsurname" id="altcontactsurname" value="[% patron.altcontactsurname | html %]" />
[% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
</li>
@ -64,7 +64,7 @@
[% BLOCK 'alt-contact-style_altcontactfirstname' %]
[% UNLESS noaltcontactfirstname %]
<li>
<label for="altcontactfirstname" [% IF mandatoryaltcontactfirstname %]class="required"[% END %]>First name: </label>
<label for="altcontactfirstname" id="altcontactfirstname_label" [% IF mandatoryaltcontactfirstname %]class="required"[% END %]>First name: </label>
<input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% patron.altcontactfirstname | html %]" />
[% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
</li>
@ -74,7 +74,7 @@
[% BLOCK 'alt-contact-style_altcontactaddress1' %]
[% UNLESS noaltcontactaddress1 %]
<li>
<label for="altcontactaddress1" [% IF mandatoryaltcontactaddress1 %]class="required"[% END %]>Address: </label>
<label for="altcontactaddress1" id="altcontactaddress1_label" [% IF mandatoryaltcontactaddress1 %]class="required"[% END %]>Address: </label>
<input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% patron.altcontactaddress1 | html %]" size="40" />
[% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
</li>
@ -84,7 +84,7 @@
[% BLOCK 'alt-contact-style_altcontactaddress2' %]
[% UNLESS noaltcontactaddress2 %]
<li>
<label for="altcontactaddress2" [% IF mandatoryaltcontactaddress2 %]class="required"[% END %]>Address 2: </label>
<label for="altcontactaddress2" id="altcontactaddress2_label" [% IF mandatoryaltcontactaddress2 %]class="required"[% END %]>Address 2: </label>
<input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% patron.altcontactaddress2 | html %]" size="40" />
[% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
</li>
@ -94,7 +94,7 @@
[% BLOCK 'alt-contact-style_altcontactzipcode' %]
[% UNLESS noaltcontactzipcode %]
<li>
<label for="altcontactzipcode" [% IF mandatoryaltcontactzipcode %]class="required"[% END %]>ZIP/Postal code: </label>
<label for="altcontactzipcode" id="altcontactzipcode_label" [% IF mandatoryaltcontactzipcode %]class="required"[% END %]>ZIP/Postal code: </label>
<input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% patron.altcontactzipcode | html %]" size="5" />
[% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
</li>
@ -104,9 +104,9 @@
[% BLOCK 'alt-contact-style_altcontactaddress3' %]
[% UNLESS noaltcontactaddress3 %]
<li>
<label for="altcontactaddress3" [% IF mandatoryaltcontactaddress3 %]class="required"[% END %]>City: </label>
<label for="altcontactaddress3" id="altcontactaddress3_label" [% IF mandatoryaltcontactaddress3 %]class="required"[% END %]>City: </label>
[% IF cities.count %]
<select class="select_city" data-addressfield="altcontact" name="select_city">
<select class="select_city" data-addressfield="altcontact" name="select_city" id="altcontactaddress3">
<option value="|||"></option>
[% FOREACH c IN cities %]
[% SET option_value = c.city_zipcode _ '|' _ c.city_name _ '|' _ c.city_state _ '|' _ c.city_country %]
@ -128,7 +128,7 @@
[% BLOCK 'alt-contact-style_altcontactstate' %]
[% UNLESS noaltcontactstate %]
<li>
<label for="altcontactstate" [% IF mandatoryaltcontactstate %]class="required"[% END %]>State: </label>
<label for="altcontactstate" id="altcontactstate_label" [% IF mandatoryaltcontactstate %]class="required"[% END %]>State: </label>
<input type="text" name="altcontactstate" id="altcontactstate" value="[% patron.altcontactstate | html %]" size="20" />
[% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
</li>
@ -138,7 +138,7 @@
[% BLOCK 'alt-contact-style_altcontactcountry' %]
[% UNLESS noaltcontactcountry %]
<li>
<label for="altcontactcountry" [% IF mandatoryaltcontactcountry %]class="required"[% END %]>Country: </label>
<label for="altcontactcountry" id="altcontactcountry_label" [% IF mandatoryaltcontactcountry %]class="required"[% END %]>Country: </label>
<input type="text" name="altcontactcountry" id="altcontactcountry" value="[% patron.altcontactcountry | html %]" size="20" />
[% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
</li>
@ -148,7 +148,7 @@
[% BLOCK 'alt-contact-style_altcontactphone' %]
[% UNLESS noaltcontactphone %]
<li>
<label for="altcontactphone" [% IF mandatoryaltcontactphone %]class="required"[% END %]>Phone: </label>
<label for="altcontactphone" id="altcontactphone_label" [% IF mandatoryaltcontactphone %]class="required"[% END %]>Phone: </label>
<input type="text" name="altcontactphone" id="altcontactphone" value="[% patron.altcontactphone | html %]" />
[% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
</li>

View File

@ -54,8 +54,8 @@
[% IF roadtypes.count %]
[% UNLESS nostreettype %]
<li>
<label for="streettype" [% IF mandatorystreettype %]class="required"[% END %]>Street type: </label>
<select name="streettype">
<label for="streettype" id="streettype_label" [% IF mandatorystreettype %]class="required"[% END %]>Street type: </label>
<select name="streettype" id="streettype">
<option value=""></option>
[% FOR roadtype IN roadtypes %]
[% IF roadtype.authorised_value == patron.streettype %]
@ -74,7 +74,7 @@
[% BLOCK 'address-style_address' %]
[% UNLESS noaddress %]
<li>
<label for="address" [% IF mandatoryaddress %]class="required"[% END %]>Address: </label>
<label for="address" id="address_label" [% IF mandatoryaddress %]class="required"[% END %]>Address: </label>
<input type="text" id="address" name="address" size="40" value="[% patron.address | html %]" />
[% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
</li>
@ -84,7 +84,7 @@
[% BLOCK 'address-style_streetnumber' %]
[% UNLESS nostreetnumber %]
<li>
<label for="streetnumber" [% IF mandatorystreetnumber %]class="required"[% END %]>Street number: </label>
<label for="streetnumber" id="streetnumber_label" [% IF mandatorystreetnumber %]class="required"[% END %]>Street number: </label>
<input type="text" id="streetnumber" name="streetnumber" value="[% patron.streetnumber | html %]" />
[% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
</li>
@ -94,7 +94,7 @@
[% BLOCK 'address-style_address2' %]
[% UNLESS noaddress2 %]
<li>
<label for="address2" [% IF mandatoryaddress2 %]class="required"[% END %]>Address 2: </label>
<label for="address2" id="address2_label" [% IF mandatoryaddress2 %]class="required"[% END %]>Address 2: </label>
<input type="text" id="address2" name="address2" size="40" value="[% patron.address2 | html %]" />
[% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
</li>
@ -104,7 +104,7 @@
[% BLOCK 'address-style_zipcode' %]
[% UNLESS nozipcode %]
<li>
<label for="zipcode" [% IF mandatoryzipcode %]class="required"[% END %]>ZIP/Postal code: </label>
<label for="zipcode" id="zipcode_label" [% IF mandatoryzipcode %]class="required"[% END %]>ZIP/Postal code: </label>
<input type="text" id="zipcode" name="zipcode" maxlength="10" size="10" value="[% patron.zipcode | html %]" />
[% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
</li>
@ -114,7 +114,7 @@
[% BLOCK 'address-style_city' %]
[% UNLESS nocity %]
<li>
<label for="city" [% IF mandatorycity %]class="required"[% END %]>City: </label>
<label for="city" id="city_label" [% IF mandatorycity %]class="required"[% END %]>City: </label>
[% IF cities.count %]
<select class="select_city" data-addressfield="" name="select_city">
<option value="|||"></option>
@ -138,7 +138,7 @@
[% BLOCK 'address-style_state' %]
[% UNLESS nostate %]
<li>
<label for="state" [% IF mandatorystate %]class="required"[% END %]>State: </label>
<label for="state" id="state_label" [% IF mandatorystate %]class="required"[% END %]>State: </label>
<input type="text" id="state" name="state" size="20" value="[% patron.state | html %]" />
[% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
</li>
@ -148,7 +148,7 @@
[% BLOCK 'address-style_country' %]
[% UNLESS nocountry %]
<li>
<label for="country" [% IF mandatorycountry %]class="required"[% END %]>Country: </label>
<label for="country" id="country_label" [% IF mandatorycountry %]class="required"[% END %]>Country: </label>
<input type="text" id="country" name="country" size="20" value="[% patron.country | html %]" />
[% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
</li>

View File

@ -440,7 +440,7 @@
[% UNLESS ( patron_category.category_type == 'I' ) %]
[% UNLESS nosex %]
<li class="radio">
<label for="gender" id="gender_label">Gender:</label>
<label for="sex-female" id="gender_label">Gender:</label>
[% UNLESS ( op == 'duplicate' ) %]
[% IF ( female ) %]
<label for="sex-female" id="sex-female_label"><input type="radio" name="sex" id="sex-female" value="F" checked="checked" /><span class="patronsex-female"> Female</span></label>
@ -535,7 +535,7 @@
[% UNLESS norelationship %]
<li>
<label for="guarantor_relationship" [% IF mandatoryrelationship %]class="required"[% END %] id="relationship_label">Relationship: </label>
<label for="new_guarantor_relationship" [% IF mandatoryrelationship %]class="required"[% END %] id="new_guarantor_relationship_label">Relationship: </label>
<select class="new_guarantor_relationship" name="new_guarantor_relationship" [% IF mandatoryrelationship %]required="required"[% END %]>
<option value=""></option>
[% FOREACH pr IN possible_relationships.split('\|') %]
@ -1007,7 +1007,7 @@
[% UNLESS noautorenew_checkouts %]
<li class="radio">
<label for="yes-autorenew_checkouts" id="yes-autorenew_checkouts_label"> Allow auto-renewal of items: </label>
<label for="yes-autorenew_checkouts" id="autorenew_checkouts_label"> Allow auto-renewal of items: </label>
[% IF ( borrower_data.autorenew_checkouts || op == 'add_form' ) %]
<label for="yes-autorenew_checkouts" id="yes-autorenew_checkouts_label">
Yes
@ -1032,7 +1032,7 @@
[% UNLESS noprotected || !CanUpdateProtectPatron %]
<li class="radio">
<label for="protected" id="protected_label">Protected:</label>
<label for="yes-protected" id="protected_label">Protected:</label>
[% IF ( patron.protected == 1 ) %]
<label for="yes-protected" id="yes-protected_label">
Yes
@ -1326,7 +1326,7 @@
<ol class="radio">
[% UNLESS nogonenoaddress %]
<li>
<label class="radio [% IF mandatorygonenoaddress %]required[% END %]" for="yesgonenoaddress" id="yesgonenoaddress_label"> Address correction needed: </label>
<label class="radio [% IF mandatorygonenoaddress %]required[% END %]" for="yesgonenoaddress" id="gonenoaddress_label"> Address correction needed: </label>
[% IF CAN_user_circulate_manage_restrictions %]
<label for="yesgonenoaddress" id="yesgonenoaddress_label">
[% IF ( borrower_data.gonenoaddress ) %]
@ -1442,13 +1442,13 @@
><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p
>
<fieldset id="manual_restriction_form">
<input type="hidden" id="add_debarment" name="add_debarment" value="0" />
<legend id="manual_restriction_lgd">Add manual restriction</legend>
<input type="hidden" id="add_debarment" name="add_debarment" value="0" />
<ol>
[% IF Koha.Preference('PatronRestrictionTypes') %]
<li>
<label for="debarred_type" id="debarred_type_label">Type:</label>
<select name="debarred_type">
<select name="debarred_type" id="debarred_type">
[% FOREACH restriction_type IN restriction_types %]
[% IF !restriction_type.is_system %]
[% IF restriction_type.is_default %]
@ -1491,7 +1491,7 @@
</legend>
<ol class="radio">
<li>
<label class="radio" for="housebound_chooser" id="housebound_chooser_label"> Chooser: </label>
<label class="radio" for="yes_housebound_chooser" id="housebound_chooser_label"> Chooser: </label>
[% IF ( housebound_role.housebound_chooser == 1 ) %]
<label for="yes_housebound_chooser" id="yes_housebound_chooser_label">Yes </label>
<input type="radio" id="yes_housebound_chooser" name="housebound_chooser" value="1" checked="checked" />
@ -1505,7 +1505,7 @@
[% END %]
</li>
<li>
<label class="radio" for="housebound_deliverer" id="housebound_deliverer_label">Deliverer:</label>
<label class="radio" for="yes_housebound_deliverer" id="housebound_deliverer_label">Deliverer:</label>
[% IF ( housebound_role.housebound_deliverer == 1 ) %]
<label for="yes_housebound_deliverer" id="yes_housebound_deliverer_label">Yes </label>
<input type="radio" id="yes_housebound_deliverer" name="housebound_deliverer" value="1" checked="checked" />