Bug 24786: (QA follow-up) Do not use 'hidden' attribute
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / html_helpers.inc
1 [% BLOCK options_for_libraries %]
2     [% FOREACH l IN libraries %]
3         [% IF l.selected %]
4             <option value="[% prefix | html %][% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
5         [% ELSE %]
6             <option value="[% prefix | html %][% l.branchcode | html %]">[% l.branchname | html %]</option>
7         [% END%]
8     [% END %]
9 [% END %]
10
11 [% BLOCK options_for_desks %]
12     <option id="nodesk" value="">---</option>
13     [% FOREACH d IN desks %]
14         [% IF d.branchcode == branch %]
15           [% IF selected == d.desk_id %]
16             <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" selected="selected">[% d.desk_name | html %]</option>
17           [% ELSE %]
18             <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" >[% d.desk_name | html %]</option>
19           [% END %]
20         [% ELSE %]
21             <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" disabled hidden>[% d.desk_name | html %]</option>
22         [% END %]
23     [% END %]
24 [% END %]
25
26 [% BLOCK options_for_registers %]
27     [% IF register_required %]
28     <option id="noregister" disabled selected="selected" value="">-- Select an option--</option>
29     [% ELSE %]
30     <option id="noregister" selected="selected" value="">-- None --</option>
31     [% END %]
32     [% FOREACH r IN registers %]
33         [% IF r.branch == Branches.GetLoggedInBranchcode %]
34             [% IF r.selected %]
35                 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" selected="selected">[% r.name | html %]</option>
36             [% ELSE %]
37                 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]">[% r.name | html %]</option>
38             [% END%]
39         [% ELSE %]
40             <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled style="display: none">[% r.name | html %]</option>
41         [% END %]
42     [% END %]
43 [% END %]
44
45 [% BLOCK options_for_authorised_value_categories %]
46     [% FOREACH avc IN authorised_value_categories %]
47         [% IF avc.selected %]
48             <option value="[% avc.category | html %]" selected="selected">[% avc.category | html %]</option>
49         [% ELSE %]
50             <option value="[% avc.category | html %]">[% avc.category | html %]</option>
51         [% END %]
52     [% END %]
53 [% END %]
54
55 [% BLOCK options_for_item_types %]
56     [% FOREACH itemtype IN itemtypes %]
57         [% IF itemtype.itemtype == selected_itemtype %]
58             <option value="[% itemtype.itemtype | html %]" selected="selected">
59         [% ELSE %]
60             <option value="[% itemtype.itemtype | html %]">
61         [% END %]
62             [% itemtype.translated_description | html %]
63         </option>
64     [% END %]
65 [% END %]