aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-03-11 17:58:14 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-03-12 11:56:07 +0000
commit552ac2112cb7a522d17199dc74d9640df32bc6c7 (patch)
tree0388143379e548c973ba22d73fd2714c8867dea9 /templates
parent25792b5e3bdebd3d1d13c370c4d6da0db3d38cef (diff)
Check better if extra question has values.
If an Open311 server returned an empty set of values, it was possible for this template to then display a set of empty dropdown options.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/new/category_extras_fields.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/web/base/report/new/category_extras_fields.html b/templates/web/base/report/new/category_extras_fields.html
index df6129672..dd5c3911d 100644
--- a/templates/web/base/report/new/category_extras_fields.html
+++ b/templates/web/base/report/new/category_extras_fields.html
@@ -14,7 +14,7 @@
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
- [% IF meta.exists('values') %]
+ [% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]