Koha/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc
Jonathan Druart 59757c1f5b Bug 21669: Do not html filter TT assignement statements
Why? Because we must filter the variables when we display them.
If we escape them on assignement, they will be double escaped:
  [% XXX = "<span>pouet</span>" | html %]
  [% XXX | html %]
  => &lt;span&gt;pouet&lt;/span&gt;

Also it will bring trouble if we are assigning a structure (see bug
21663 for instance).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-26 16:38:36 +00:00

27 lines
1.2 KiB
HTML

[%# First check to see if we have anything selected, otherwise we select all %]
[% selectall = 1 %]
[% FOREACH branch IN branches %]
[% IF branch.selected %]
[% selectall = 0 %]
[% END %]
[% END %]
<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-remove"></i> Clear all</a></p>
<div class="branchgridrow">
[% FOREACH branch IN branches %]
<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" />
[% ELSE %]
<input id="branch_[% branch.branchcode | html %]" class="branch-select" type="checkbox" name="branch" value="[% branch.branchcode | html %]" />
[% END %]
<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>
</div>