diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-10-21 13:38:01 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-10-28 11:35:20 +0000 |
commit | 1022f0672adfaaab85e3e2d2ca1adddc6ea706dd (patch) | |
tree | 28e0ac2a54be7f39007b38b4bf35d535b8a2ff5a /perllib/FixMyStreet/Cobrand/IsleOfWight.pm | |
parent | 64687c93beffc07d0fcb10459e5a898544bf8aae (diff) |
[UK] Factor out Confirm open311_config to role.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/IsleOfWight.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/IsleOfWight.pm | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm index 26e3ba474..83431c532 100644 --- a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm +++ b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm @@ -4,6 +4,9 @@ use parent 'FixMyStreet::Cobrand::Whitelabel'; use strict; use warnings; +use Moo; +with 'FixMyStreet::Roles::ConfirmOpen311'; + sub council_area_id { 2636 } sub council_area { 'Isle of Wight' } sub council_name { 'Island Roads' } @@ -78,29 +81,6 @@ sub open311_pre_send { } } -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 }; - - if (!$row->get_extra_field_value('site_code')) { - if (my $site_code = $self->lookup_site_code($row)) { - push @$extra, - { name => 'site_code', - value => $site_code }; - } - } - - $row->set_extra_fields(@$extra); -} - # Make sure fetched report description isn't shown. sub filter_report_description { "" } |