Bug 41071: Fix missing space in cash register classes

It seems we dropped a space somewhere so the class for default registers had become:
   "{Branchcode}default" instead of "{Branchcode} default"
This broke the JS for selecting

To test:
1 - Enable UseCashRegisters system preference
2 - Create three registers for three different branches
3 - Make each register the default
4 - Click on username in top right
5 - Select 'Set library and cash register'
6 - Choose on of the three branches
7 - Note the dropdown does not populate with the default
8 - Note no registers can be selected
9 - Apply patch
10 - Reload the page
11 - Change libraries and verify all works as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 301ec5dae2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Nick Clemens 2025-10-22 13:47:24 +00:00 committed by Paul Derscheid
parent 0ca35af93a
commit 75af2efd77
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 3 additions and 3 deletions

View File

@ -27,12 +27,12 @@
[% FOREACH r IN registers %]
[% IF r.branch == Branches.GetLoggedInBranchcode %]
[% IF r.selected %]
<option class="[%- r.branch | html -%][%- IF r.branch_default -%]default[%- END -%]" value="[% r.id | html %]" selected="selected">[% r.name | html %]</option>
<option class="[%- r.branch | html -%][%- IF r.branch_default -%][% ' ' | html %]default[%- END -%]" value="[% r.id | html %]" selected="selected">[% r.name | html %]</option>
[% ELSE %]
<option class="[%- r.branch | html -%][%- IF r.branch_default -%]default[%- END -%]" value="[% r.id | html %]">[% r.name | html %]</option>
<option class="[%- r.branch | html -%][%- IF r.branch_default -%][% ' ' | html %]default[%- END -%]" value="[% r.id | html %]">[% r.name | html %]</option>
[% END %]
[% ELSE %]
<option class="[%- r.branch | html -%][%- IF r.branch_default -%]default[%- END -%]" value="[% r.id | html %]" disabled="disabled" style="display: none">[% r.name | html %]</option>
<option class="[%- r.branch | html -%][%- IF r.branch_default -%][% ' ' | html %]default[%- END -%]" value="[% r.id | html %]" disabled="disabled" style="display: none">[% r.name | html %]</option>
[% END %]
[% END %]
[% END %]