Browse Source

Bug 24665: (QA follow-up) Fix selection default

This patch updates the html_helper for the cash register selection block
to remove the 'empty option' such that it can be correclty set for each
select case and updates all existing cases where we used the process
block previously to include the relevant blank option '-- Select an
option --', '-- None --', 'Library default' and finally the new '-- All
--' options introduced with this bug.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Martin Renvoize 9 months ago
committed by Jonathan Druart
parent
commit
b7dd0d62dd
  1. 5
      koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
  2. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
  3. 1
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt
  4. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
  5. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
  6. 3
      koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt
  7. 1
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt

5
koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc

@ -24,11 +24,6 @@
[% END %]
[% BLOCK options_for_registers %]
[% IF register_required %]
<option id="noregister" disabled selected="selected" value="">-- Select an option--</option>
[% ELSE %]
<option id="noregister" selected="selected" value="">-- None --</option>
[% END %]
[% FOREACH r IN registers %]
[% IF r.branch == Branches.GetLoggedInBranchcode %]
[% IF r.selected %]

4
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt

@ -102,9 +102,7 @@
<label for="register_id">Cash register:</label>
<select name="register_id" id="register_id" class="input" tabindex="4">
<option id="noregister" value="" selected="selected">Library default</option>
[% FOREACH r IN Registers.all() %]
<option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled style="display: none">[% r.name | html %]</option>
[% END %]
[% PROCESS options_for_registers registers => Registers.all() %]
</select>
</p>
[% END %]

1
koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt

@ -106,6 +106,7 @@ Updated:<ul>
<li>
<label for="register_id">Choose cash register:</label>
<select name="register_id" id="register_id">
<option id="noregister" selected="selected" value="">-- None --</option>
[% PROCESS options_for_registers registers => Registers.all() %]
</select>
</li>

6
koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt

@ -185,7 +185,8 @@
<li>
<label for="registerid">Cash register: </label>
<select name="registerid" id="payout_registerid">
[% PROCESS options_for_registers register_required => 1 %]
<option id="noregister" disabled selected="selected" value="">-- Select an option--</option>
[% PROCESS options_for_registers %]
</select>
</li>
[% END %]
@ -251,7 +252,8 @@
<li>
<label for="registerid">Cash register: </label>
<select name="registerid" id="refund_registerid">
[% PROCESS options_for_registers register_required => 1 %]
<option id="noregister" disabled selected="selected" value="">-- Select an option--</option>
[% PROCESS options_for_registers %]
</select>
</li>
[% END %]

6
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt

@ -155,7 +155,8 @@
<li>
<label for="cash_register">Cash register: </label>
<select name="cash_register" id="cash_register">
[% PROCESS options_for_registers register_required => 1 %]
<option id="noregister" disabled selected="selected" value="">-- Select an option--</option>
[% PROCESS options_for_registers %]
</select>
</li>
[% END %]
@ -285,7 +286,8 @@
<li>
<label for="cash_register">Cash register: </label>
<select name="cash_register" id="cash_register">
[% PROCESS options_for_registers register_required => 1 %]
<option id="noregister" disabled selected="selected" value="">-- Select an option--</option>
[% PROCESS options_for_registers %]
</select>
</li>
[% END %]

3
koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt

@ -129,7 +129,8 @@
<li>
<label for="registerid">Cash register: </label>
<select name="registerid" id="registerid">
[% PROCESS options_for_registers register_required => 1 %]
<option id="noregister" disabled selected="selected" value="">-- Select an option--</option>
[% PROCESS options_for_registers %]
</select>
</li>
</ol>

1
koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt

@ -104,6 +104,7 @@
<li>
<label for="registerid">Cash register: </label>
<select name="registerid" id="registerid">
<option id="noregister" selected="selected" value="">-- All --</option>
[% PROCESS options_for_registers registers => Registers.all( selected => registerid ) %]
</select>
</li>

Loading…
Cancel
Save