aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-02-04 10:31:20 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-02-04 12:30:59 +0000
commit120b57d121f426ac54d390e649518b737748d58c (patch)
tree49160480f0de3fb3bf9c80df83ab78cd252e0301 /perllib/FixMyStreet/App/Controller/Report
parent5e946a60ac98c984ca21ba3203ccb03be17d9a39 (diff)
Allow Open311 codes starting with ‘_’ to function.
Template Toolkit treats keys starting with ‘_’ as private and does not expose them. It is possible for an Open311 server to return fields starting with an underscore, and we want to use those in the template.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index e6c4fe50d..2de1d8551 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1078,7 +1078,7 @@ sub set_report_extras : Private {
foreach my $field ( @$metas ) {
if ( lc( $field->{required} ) eq 'true' && !$c->cobrand->category_extra_hidden($field)) {
unless ( $c->get_param($param_prefix . $field->{code}) ) {
- $c->stash->{field_errors}->{ $field->{code} } = _('This information is required');
+ $c->stash->{field_errors}->{ 'x' . $field->{code} } = _('This information is required');
}
}
push @extra, {
@@ -1093,7 +1093,7 @@ sub set_report_extras : Private {
if ( scalar @$contacts );
if ( @extra ) {
- $c->stash->{report_meta} = { map { $_->{name} => $_ } @extra };
+ $c->stash->{report_meta} = { map { 'x' . $_->{name} => $_ } @extra };
$c->stash->{report}->set_extra_fields( @extra );
}
}