diff options
author | Struan Donald <struan@exo.org.uk> | 2019-01-16 18:35:18 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-03-25 14:39:45 +0000 |
commit | 4b1d07e90966994e13245fd1323d65a0d1dd2457 (patch) | |
tree | c56567fc76b6f31e9bac34e78a0db410ce30acbe /perllib | |
parent | 44e52db4d0eb01e09b4c4210203eeb485c637b49 (diff) |
[Northamptonshire] cobrand config, template and css changes
Co-authored-by: Zarino Zappia <zarino@mysociety.org>
Co-authored-by: Matthew Somerville <matthew@mysociety.org>
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Northamptonshire.pm | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm new file mode 100644 index 000000000..77af588ef --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm @@ -0,0 +1,85 @@ +package FixMyStreet::Cobrand::Northamptonshire; +use parent 'FixMyStreet::Cobrand::Whitelabel'; + +use strict; +use warnings; + +use Moo; +with 'FixMyStreet::Roles::ConfirmValidation'; + +sub council_area_id { 2234 } +sub council_area { 'Northamptonshire' } +sub council_name { 'Northamptonshire County Council' } +sub council_url { 'northamptonshire' } + +sub example_places { ( 'NN1 1NS', "Bridge Street" ) } + +sub enter_postcode_text { 'Enter a Northamptonshire postcode, street name and area, or check an existing report number' } + +sub base_url { + my $self = shift; + return $self->next::method() if FixMyStreet->config('STAGING_SITE'); + return 'https://fixmystreet.northamptonshire.gov.uk'; +} + +sub disambiguate_location { + my $self = shift; + my $string = shift; + + return { + %{ $self->SUPER::disambiguate_location() }, + centre => '52.30769080650276,-0.8647071378799923', + bounds => [ 51.97726778979222, -1.332346116362747, 52.643600776698605, -0.3416080408721255 ], + }; +} + +sub send_questionnaires { 0 } + +sub on_map_default_status { 'open' } + +sub report_sent_confirmation_email { 1 } + +sub contact_email { + my $self = shift; + return join( '@', 'highways', $self->council_url . '.gov.uk' ); +} + +sub privacy_policy_url { + 'https://www3.northamptonshire.gov.uk/councilservices/council-and-democracy/transparency/information-policies/privacy-notice/place/Pages/street-doctor.aspx' +} + +sub enable_category_groups { 1 } + +sub is_two_tier { 1 } + +sub get_geocoder { 'OSM' } + +sub map_type { 'OSM' } + +sub open311_config { + my ($self, $row, $h, $params) = @_; + + my $extra = $row->get_extra_fields; + + # remove the emergency category which is informational only + @$extra = grep { $_->{name} ne 'emergency' } @$extra; + + push @$extra, + { name => 'report_url', + value => $h->{url} }, + { name => 'title', + value => $row->title }, + { name => 'description', + value => $row->detail }, + { name => 'category', + value => $row->category }; + + $row->set_extra_fields(@$extra); + + $params->{multi_photos} = 1; +} + +# sending updates not part of initial phase +sub should_skip_sending_update { 1; } + +1; |