aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/Peterborough.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Peterborough.pm b/perllib/FixMyStreet/Cobrand/Peterborough.pm
index 4e5b75751..5ea847c89 100644
--- a/perllib/FixMyStreet/Cobrand/Peterborough.pm
+++ b/perllib/FixMyStreet/Cobrand/Peterborough.pm
@@ -4,6 +4,9 @@ use parent 'FixMyStreet::Cobrand::Whitelabel';
use strict;
use warnings;
+use Moo;
+with 'FixMyStreet::Roles::ConfirmValidation';
+
sub council_area_id { 2566 }
sub council_area { 'Peterborough' }
sub council_name { 'Peterborough City Council' }
@@ -29,4 +32,32 @@ sub geocoder_munge_results {
$result->{display_name} =~ s/, City of Peterborough, East of England, England//;
}
+sub admin_user_domain { "peterborough.gov.uk" }
+
+sub open311_config {
+ my ($self, $row, $h, $params) = @_;
+
+ my $extra = $row->get_extra_fields;
+ push @$extra,
+ { name => 'report_url',
+ value => $h->{url} },
+ { name => 'title',
+ value => $row->title },
+ { name => 'description',
+ value => $row->detail };
+
+ # remove the emergency category which is informational only
+ @$extra = grep { $_->{name} ne 'emergency' } @$extra;
+
+ $row->set_extra_fields(@$extra);
+}
+
+sub open311_munge_update_params {
+ my ($self, $params, $comment, $body) = @_;
+
+ # Peterborough want to make it clear in Confirm when an update has come
+ # from FMS.
+ $params->{description} = "[Customer FMS update] " . $params->{description};
+}
+
1;