[% # PROCESS site/js/jquery.tt # already loaded in html_wrapper %]
[% # site.html.expand %] [% total_tests = 0 %] [% FOREACH section IN lab_tests.keys.sort; # PROCESS dumper.tt dump = lab_tests.item(section) %] [% # slurp active tests: active_tests = [ ]; # reset array FOREACH test IN lab_tests.item(section); # PROCESS dumper.tt dump = test; NEXT IF test.is_active.match('no'); active_tests.push(test.field_label) IF test.selected; END; NEXT UNLESS active_tests.size; %]

[% section %] [[% active_tests.size %]]: [% FOREACH test IN active_tests; # INCLUDE dumper.tt dump = lab_tests.${test}.as_tree; %] [% test %][% UNLESS loop.last %],[% END %] [% END %]

[% total_tests = total_tests + active_tests.size %] [% END %] [% UNLESS total_tests %]

[ no tests allocated ]

[% END %] [% IF csrf_token; PROCESS site/csrf.tt; END %]

[% site.html.submit %] [% site.html.reset %]