aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/New.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-08-03 09:50:05 +0100
committerStruan Donald <struan@exo.org.uk>2011-08-03 09:50:05 +0100
commitdbaf8d84b9cd52380a031b801370bb6a0f8e4c22 (patch)
treed1841a90f8536ca17df49e2b667b4d3a096de31e /perllib/FixMyStreet/App/Controller/Report/New.pm
parent9415569a17bf3044c7f3253c923f556436d48942 (diff)
parent76f39991e1caf89e12e8bb8f49ba0a99df56f3dc (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into open311-consumer
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 5cf634e14..2311b4aff 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -493,7 +493,7 @@ sub setup_categories_and_councils : Private {
next # TODO - move this to the cobrand
if $c->cobrand->moniker eq 'southampton'
- && $contact->category eq 'Street lighting';
+ && $contact->category =~ /Street lighting|Traffic lights/;
next if $contact->category eq _('Other');
@@ -617,6 +617,7 @@ sub process_report : Private {
map { $_ => scalar $c->req->param($_) } #
(
'title', 'detail', 'pc', #
+ 'detail_size', 'detail_depth',
'may_show_name', #
'category', #
'partial', #
@@ -635,8 +636,14 @@ sub process_report : Private {
# clean up text before setting
$report->title( Utils::cleanup_text( $params{title} ) );
- $report->detail(
- Utils::cleanup_text( $params{detail}, { allow_multiline => 1 } ) );
+
+ my $detail = Utils::cleanup_text( $params{detail}, { allow_multiline => 1 } );
+ for my $w ('depth', 'size') {
+ next unless $params{"detail_$w"};
+ next if $params{"detail_$w"} eq '-- Please select --';
+ $detail .= "\n\n\u$w: " . $params{"detail_$w"};
+ }
+ $report->detail( $detail );
# set these straight from the params
$report->category( _ $params{category} );