Bug 38714: branch-selector.inc

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-12-18 16:33:47 +01:00 committed by Katrin Fischer
parent 10af6e88ec
commit 9506b4d1b2
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 6 additions and 5 deletions

View File

@ -1,8 +1,12 @@
[%# To select all include with selectall = 1 %]
<div class="branchselector">
<p><a href="#" id="checkall"> <i class="fa fa-check"></i> Select all</a> | <a href="#" id="checknone"> <i class="fa fa-times"></i> Clear all</a></p>
[% SET branches_for_loop = branches.hash(1).keys.nsort %][%# Do not modify the original variable 'branches' %]
[% WHILE branches_for_loop.size > 0 %]
<div class="branchgridrow">
[% FOREACH branch IN branches %]
[% FOREACH i IN branches_for_loop.splice(0, 4) %]
[% i = i - 1%]
[% SET branch = branches.$i %]
<div class="branchgriditem">
[% IF branch.selected || (selectall == 1) %]
<input id="branch_[% branch.branchcode | html %]" class="branch_select" type="checkbox" name="branch" value="[% branch.branchcode | html %]" checked="checked" />
@ -12,10 +16,7 @@
<label for="branch_[% branch.branchcode | html %]">[% branch.branchname | html %]</label>
</div>
[% IF loop.count() % 4 == 0 && !loop.last() %]
</div>
<div class="branchgridrow">
[% END %]
[% END %]
</div>
[% END %]
</div>