Bug 28138: (follow-up) Add empty option to payment type selection

This patch adds an empty <option> to the "Payment type" selection when
paying fine. This forces the user to actively make a selection. I've
also added the text "None selected" to the other empty <option> on the
page for consistency.

To test, apply the patch and test the pay fine interface with and
without the RequirePaymentType preference enabled. When enabled the
payment type should be required and it should default to "None
selected."

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2022-04-21 18:17:41 +00:00 committed by Fridolin Somers
parent effefacf30
commit 365bde3877

View file

@ -9,6 +9,7 @@
[% IF Koha.Preference('UseCashRegisters') || Koha.Preference('RequirePaymentType') %]
<label for="[% type | html %]_type" class="required">[% IF type == 'payment' %]Payment[% ELSE %]Transaction[% END %] type: </label>
<select name="[% type | html %]_type" id="[% type | html %]_type" class="required" required="required">
<option value="">None selected</option>
[% IF type == 'refund' %]
<option value="AC">Account credit</option>
[% END %]
@ -20,7 +21,7 @@
[%- ELSE -%]
<label for="[% type | html %]_type">[% IF type == 'payment' %]Payment[% ELSE %]Transaction[% END %] type: </label>
<select name="[% type | html %]_type" id="[% type | html %]_type">
<option value=""></option>
<option value="">None selected</option>
[% IF type == 'refund' %]
<option value="AC">Account credit</option>
[% END %]