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:
parent
10af6e88ec
commit
9506b4d1b2
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue