1 [%# First check to see if we have anything selected, otherwise we select all %]
3 [% FOREACH branch IN branches %]
4 [% IF branch.selected %]
8 <div class="branchselector">
9 <p><a href="#" id="checkall"> <i class="fa fa-check"></i> Select all</a> | <a href="#" id="checknone"> <i class="fa fa-remove"></i> Clear all</a></p>
10 <div class="branchgridrow">
11 [% FOREACH branch IN branches %]
12 <div class="branchgriditem">
13 [% IF branch.selected || (selectall == 1) %]
14 <input id="branch_[% branch.branchcode | html %]" class="branch_select" type="checkbox" name="branch" value="[% branch.branchcode | html %]" checked="checked" />
16 <input id="branch_[% branch.branchcode | html %]" class="branch-select" type="checkbox" name="branch" value="[% branch.branchcode | html %]" />
19 <label for="branch_[% branch.branchcode | html %]">[% branch.branchname | html %]</label>
21 [% IF loop.count() % 4 == 0 && !loop.last() %]
23 <div class="branchgridrow">