[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END ~%] [% # If only one option, pre-select that as if it were already selected. This # carries through to the category_extras template because this template is # included with PROCESS. IF category_options.size == 1; category = category_options.0.category; END; IF category; category_lc = category | lower; END ~%] [% IF category_options.size OR category_groups.size ~%] [% IF native_app %] [% INCLUDE 'report/new/category-app.html' %] [% ELSE %]
[%~ form_category_label OR loc('Category') ~%] [%~ FOREACH group_or_cat IN category_groups ~%]
[% IF group_or_cat.name %] [% group_hint = group_or_cat.categories.first.get_extra_metadata('group_hint') %] [%~ IF group_hint %]
[% group_hint | safe %]
[% END ~%] [% ELSE # A category not in a group %] [% cat_lc = group_or_cat.category | lower =%] [%~ IF group_or_cat.get_extra_metadata('category_hint') %]
[% group_or_cat.get_extra_metadata('category_hint') | safe %]
[% END ~%] [%~ END =%]
[%~ END =%]
[% END %] [%~ END ~%]