aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-06-15 13:24:30 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-06-15 13:47:53 +0100
commitd70cd6e05ce3670d54858d9519414e8b731c1f8e (patch)
tree81c6c81ff1e31a3de8650233173e70dd73441d7f
parent576e65e5b9116899655bf1db4bce2bd6b412e91f (diff)
Improve template check for extra Open311 fields.
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm1
-rw-r--r--templates/web/base/report/new/category_extras.html2
2 files changed, 1 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index b60f7ee78..110d268d7 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -226,7 +226,6 @@ sub category_extras_ajax : Path('category_extras') : Args(0) {
my $category_extra = '';
my $generate;
if ( $c->stash->{category_extras}->{$category} && @{ $c->stash->{category_extras}->{$category} } >= 1 ) {
- $c->stash->{report_meta} = {};
$c->stash->{category_extras} = { $category => $c->stash->{category_extras}->{$category} };
$generate = 1;
}
diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html
index 6275cd1b7..c416556e2 100644
--- a/templates/web/base/report/new/category_extras.html
+++ b/templates/web/base/report/new/category_extras.html
@@ -5,7 +5,7 @@
[% INCLUDE "report/new/unresponsive_body.html" body_id = unresponsive.$category %]
[%- END %]
- [%- IF report_meta %]
+ [%- IF category_extras.$category.size %]
<h4>[% loc('Additional Information') %]</h4>
[%- FOR meta IN category_extras.$category %]
[%- meta_name = meta.code -%]