diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-03-18 14:01:13 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2014-04-07 17:50:31 +0100 |
commit | b82228ce014cc87866d976eeb3ce6e454e87c336 (patch) | |
tree | 05a62cd49b64d32e37c0c0e6ff57eed9cfc122d7 /templates | |
parent | 397252f4463fb787753d99ea57e8a1385fa31a1e (diff) |
If we only have one real category option, automatically select it.
Fixes #690.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/default/report/new/category.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/web/default/report/new/category.html b/templates/web/default/report/new/category.html index a6f2bf14d..ee47adc9e 100644 --- a/templates/web/default/report/new/category.html +++ b/templates/web/default/report/new/category.html @@ -12,7 +12,7 @@ <select name='category' id='form_category'[% ' onchange="form_category_onchange()"' IF category_extras.size %]> [% FOREACH cat_op IN category_options %] [% cat_op_lc = cat_op | lower %] - <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc -%] + <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc || (category_options.size == 2 AND loop.last) -%] >[% IF loop.first %][% cat_op %][% ELSE %][% cat_op | html %][% END %]</option> [% END %] </select> |