Bug 30243: When branccode is required on OPAC suggestion page default to empty value

To test:
1. Apply patch
2. Go the purchase suggestion page and see that branchcode defaults to the first option in the list.
3. Go to OPACSuggestionMandatoryFields and mark branchcode as required
4. BAck on the OPAC suggestion page notice that the branchcode defaults to an empty value
5. Try to submit the form without changing it, you cannot. You must choose a branch

Signed-off-by: shiyao <shiyao@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Lucas Gass 2022-03-09 14:55:21 +00:00 committed by Fridolin Somers
parent 9cad82b3c6
commit aae0674701
1 changed files with 1 additions and 0 deletions

View File

@ -188,6 +188,7 @@
[% IF ( branchcode_required ) %]
<label for="branch" class="required">Library:</label>
<select name="branchcode" id="branch" required="required">
<option value=""></option>
[% PROCESS options_for_libraries libraries => Branches.all( selected => logged_in_user.branchcode ) %]
</select>
<div class="required_label required">Required</div>