diff options
author | Jon Kristensen <info@jonkri.com> | 2014-02-14 18:30:20 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2014-03-11 17:31:30 +0000 |
commit | cf20c709e13af0909620ac5387b7d070b66b8c52 (patch) | |
tree | 380727210ad56a3ae3049a0b8030fa105791d0b4 /perllib | |
parent | b06e459b7616ea508d273443cb66f81a30d05a74 (diff) |
Alter Open311 description to only include English on FixMyStreet.
This could be made cobrand-customisable in future.
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/Open311.pm | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index 94d81e479..6c811d445 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -172,19 +172,18 @@ sub _generate_service_request_description { my $problem = shift; my $extra = shift; - my $description = <<EOT; -detail: @{[$problem->detail()]} - -url: $extra->{url} - -Submitted via FixMyStreet -EOT -; - if ($self->extended_description ne 'oxfordshire') { - $description = <<EOT . $description; -title: @{[$problem->title()]} - -EOT + my $description = ""; + if ($problem->cobrand eq 'fixmystreet') { + $description .= "detail: " . $problem->detail . "\n\n"; + $description .= "url: " . $extra->{url} . "\n\n"; + $description .= "Submitted via FixMyStreet\n"; + if ($self->extended_description ne 'oxfordshire') { + $description = "title: " . $problem->title . "\n\n$description"; + } + } else { + $description .= $problem->title . "\n\n"; + $description .= $problem->detail . "\n\n"; + $description .= $extra->{url} . "\n"; } return $description; |