aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm4
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/BathNES.pm15
-rw-r--r--perllib/FixMyStreet/Cobrand/Bexley.pm13
-rw-r--r--perllib/FixMyStreet/Cobrand/Borsetshire.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Bristol.pm15
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm16
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm17
-rw-r--r--perllib/FixMyStreet/Cobrand/EastHerts.pm16
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm9
-rw-r--r--perllib/FixMyStreet/Cobrand/Greenwich.pm17
-rw-r--r--perllib/FixMyStreet/Cobrand/Hart.pm10
-rw-r--r--perllib/FixMyStreet/Cobrand/Hounslow.pm12
-rw-r--r--perllib/FixMyStreet/Cobrand/Lincolnshire.pm19
-rw-r--r--perllib/FixMyStreet/Cobrand/Northamptonshire.pm13
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm15
-rw-r--r--perllib/FixMyStreet/Cobrand/Rutland.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Stevenage.pm15
-rw-r--r--perllib/FixMyStreet/Cobrand/UK.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm21
-rw-r--r--perllib/FixMyStreet/Cobrand/Warwickshire.pm10
-rw-r--r--perllib/FixMyStreet/DB/Result/Body.pm16
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm2
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm2
24 files changed, 61 insertions, 215 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 156c81065..6a6040865 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -202,9 +202,7 @@ sub report_form_ajax : Path('ajax') : Args(0) {
my @list_of_names = map { $_->name } values %{$c->stash->{bodies}};
my %display_names = map {
- my $name = $_->get_cobrand_handler && $_->get_cobrand_handler->can('council_name')
- ? $_->get_cobrand_handler->council_name
- : $_->name;
+ my $name = $_->cobrand_name;
( $_->name ne $name ) ? ( $_->name => $name ) : ();
} values %{$c->stash->{bodies}};
my $contribute_as = {};
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index fc5176a07..9b33b42b4 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -287,12 +287,12 @@ sub rss_ward : Path('/rss/reports') : Args(2) {
if ($c->stash->{ward}) {
# Problems sent to a council, restricted to a ward
$c->stash->{type} = 'ward_problems';
- $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->name, WARD => $c->stash->{ward}{name} };
+ $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->cobrand_name, WARD => $c->stash->{ward}{name} };
$c->stash->{db_params} = [ $c->stash->{body}->id, $c->stash->{ward}->{id} ];
} else {
# Problems sent to a council
$c->stash->{type} = 'council_problems';
- $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->name };
+ $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->cobrand_name };
$c->stash->{db_params} = [ $c->stash->{body}->id ];
}
diff --git a/perllib/FixMyStreet/Cobrand/BathNES.pm b/perllib/FixMyStreet/Cobrand/BathNES.pm
index e26e846c3..d726c671e 100644
--- a/perllib/FixMyStreet/Cobrand/BathNES.pm
+++ b/perllib/FixMyStreet/Cobrand/BathNES.pm
@@ -17,27 +17,12 @@ sub council_area { return 'Bath and North East Somerset'; }
sub council_name { return 'Bath and North East Somerset Council'; }
sub council_url { return 'bathnes'; }
-sub contact_email {
- my $self = shift;
- return join( '@', 'councilconnect_rejections', 'bathnes.gov.uk' );
-}
-
sub admin_user_domain { 'bathnes.gov.uk' }
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fix.bathnes.gov.uk';
-}
-
sub map_type { 'BathNES' }
sub on_map_default_status { 'open' }
-sub example_places {
- return ( 'BA1 1JQ', "Lansdown Grove" );
-}
-
sub get_geocoder {
return 'OSM'; # default of Bing gives poor results, let's try overriding.
}
diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm
index c89fd9895..727382ec0 100644
--- a/perllib/FixMyStreet/Cobrand/Bexley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bexley.pm
@@ -8,19 +8,11 @@ sub council_area_id { 2494 }
sub council_area { 'Bexley' }
sub council_name { 'London Borough of Bexley' }
sub council_url { 'bexley' }
-sub example_places { ( 'DA6 7AT', "Chieveley Road" ) }
sub get_geocoder { 'OSM' }
sub enable_category_groups { 1 }
sub suggest_duplicates { 1 }
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- # uncoverable statement
- return 'https://fix.bexley.gov.uk';
-}
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
@@ -34,11 +26,6 @@ sub disambiguate_location {
sub on_map_default_status { 'open' }
-sub contact_email {
- my $self = shift;
- return join( '@', 'customer.services', $self->council_url . '.gov.uk' );
-}
-
sub open311_munge_update_params {
my ($self, $params, $comment, $body) = @_;
diff --git a/perllib/FixMyStreet/Cobrand/Borsetshire.pm b/perllib/FixMyStreet/Cobrand/Borsetshire.pm
index 44a4a9162..a99d2e7b4 100644
--- a/perllib/FixMyStreet/Cobrand/Borsetshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Borsetshire.pm
@@ -9,10 +9,6 @@ sub council_area { return 'Borsetshire'; }
sub council_name { return 'Borsetshire County Council'; }
sub council_url { return 'demo'; }
-sub example_places {
- return ( 'BS36 2NS', 'Coalpit Heath' );
-}
-
sub pin_colour {
my ( $self, $p, $context ) = @_;
return 'grey' if $p->is_closed;
diff --git a/perllib/FixMyStreet/Cobrand/Bristol.pm b/perllib/FixMyStreet/Cobrand/Bristol.pm
index fa2d3fabb..177e2172b 100644
--- a/perllib/FixMyStreet/Cobrand/Bristol.pm
+++ b/perllib/FixMyStreet/Cobrand/Bristol.pm
@@ -9,16 +9,6 @@ sub council_area { return 'Bristol'; }
sub council_name { return 'Bristol County Council'; }
sub council_url { return 'bristol'; }
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fixmystreet.bristol.gov.uk';
-}
-
-sub example_places {
- return ( 'BS1 5TR', "Broad Quay" );
-}
-
sub map_type {
'Bristol';
}
@@ -50,11 +40,6 @@ sub pin_colour {
return 'yellow';
}
-sub contact_email {
- my $self = shift;
- return join( '@', 'customer.services', 'bristol.gov.uk' );
-}
-
sub send_questionnaires {
return 0;
}
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index 986836b2f..ce7c0971f 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -33,12 +33,6 @@ sub report_new_munge_before_insert {
$report->subcategory($report->get_extra_field_value('service_sub_code'));
}
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fix.bromley.gov.uk';
-}
-
sub problems_on_map_restriction {
my ($self, $rs) = @_;
return $rs if FixMyStreet->staging_flag('skip_checks');
@@ -87,10 +81,6 @@ sub get_geocoder {
return 'OSM'; # default of Bing gives poor results, let's try overriding.
}
-sub example_places {
- return ( 'BR1 3UH', 'Glebe Rd, Bromley' );
-}
-
sub map_type {
'Bromley';
}
@@ -121,12 +111,6 @@ sub process_open311_extras {
$self->SUPER::process_open311_extras( @_, [ 'first_name', 'last_name' ] );
}
-sub contact_email {
- my $self = shift;
- return join( '@', 'info', 'bromley.gov.uk' );
-}
-sub contact_name { 'Bromley Council (do not reply)'; }
-
sub abuse_reports_only { 1; }
sub reports_per_page { return 20; }
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
index 6a6da22b6..486e9603d 100644
--- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -1,5 +1,5 @@
package FixMyStreet::Cobrand::Buckinghamshire;
-use parent 'FixMyStreet::Cobrand::UKCouncils';
+use parent 'FixMyStreet::Cobrand::Whitelabel';
use strict;
use warnings;
@@ -12,16 +12,6 @@ sub council_area { return 'Buckinghamshire'; }
sub council_name { return 'Buckinghamshire County Council'; }
sub council_url { return 'buckinghamshire'; }
-sub example_places {
- return ( 'HP19 7QF', "Walton Road" );
-}
-
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fixmystreet.buckscc.gov.uk';
-}
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
@@ -53,11 +43,6 @@ sub pin_colour {
sub admin_user_domain { 'buckscc.gov.uk' }
-sub contact_email {
- my $self = shift;
- return join( '@', 'fixmystreetbs', 'email.buckscc.gov.uk' );
-}
-
sub send_questionnaires {
return 0;
}
diff --git a/perllib/FixMyStreet/Cobrand/EastHerts.pm b/perllib/FixMyStreet/Cobrand/EastHerts.pm
index 0e60c6b08..806f9cc3c 100644
--- a/perllib/FixMyStreet/Cobrand/EastHerts.pm
+++ b/perllib/FixMyStreet/Cobrand/EastHerts.pm
@@ -9,22 +9,11 @@ sub council_area { return 'East Hertfordshire'; }
sub council_name { return 'East Hertfordshire District Council'; }
sub council_url { return 'eastherts'; }
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fixmystreet.eastherts.gov.uk';
-}
-
-
sub enter_postcode_text {
my ($self) = @_;
return 'Enter an ' . $self->council_area . ' postcode, or street name and area';
}
-sub example_places {
- return ( 'SG14 2AP', "Mangrove Road" );
-}
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
@@ -46,9 +35,4 @@ sub pin_colour {
return 'yellow';
}
-sub contact_email {
- my $self = shift;
- return join( '@', 'enquiries', 'eastherts.gov.uk' );
-}
-
1;
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index fb454f495..e01f3e23b 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -39,6 +39,15 @@ sub restriction {
return {};
}
+sub munge_category_list {
+ my ($self, $options, $contacts, $extras) = @_;
+
+ # No TfL Traffic Lights category in Hounslow
+ my %bodies = map { $_->body->name => 1 } @$contacts;
+ return unless $bodies{'Hounslow Borough Council'};
+ @$options = grep { ($_->{category} || $_->category) !~ /^Traffic lights$/i } @$options;
+}
+
sub title_list {
my $self = shift;
my $areas = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Greenwich.pm b/perllib/FixMyStreet/Cobrand/Greenwich.pm
index 2aaa5d776..d39bd5dd2 100644
--- a/perllib/FixMyStreet/Cobrand/Greenwich.pm
+++ b/perllib/FixMyStreet/Cobrand/Greenwich.pm
@@ -5,20 +5,10 @@ use strict;
use warnings;
sub council_area_id { return 2493; }
-sub council_area { return 'Greenwich'; }
+sub council_area { return 'Royal Borough of Greenwich'; }
sub council_name { return 'Royal Borough of Greenwich'; }
sub council_url { return 'greenwich'; }
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fix.royalgreenwich.gov.uk';
-}
-
-sub example_places {
- return ( 'SE18 6HQ', "Woolwich Road" );
-}
-
sub enter_postcode_text {
my ($self) = @_;
return 'Enter a Royal Greenwich postcode, or street name and area';
@@ -50,11 +40,6 @@ sub pin_colour {
return 'yellow';
}
-sub contact_email {
- my $self = shift;
- return join( '@', 'fixmystreet', 'royalgreenwich.gov.uk' );
-}
-
sub reports_per_page { return 20; }
sub open311_config {
diff --git a/perllib/FixMyStreet/Cobrand/Hart.pm b/perllib/FixMyStreet/Cobrand/Hart.pm
index 3ff2a2a19..24a358ab8 100644
--- a/perllib/FixMyStreet/Cobrand/Hart.pm
+++ b/perllib/FixMyStreet/Cobrand/Hart.pm
@@ -26,10 +26,6 @@ sub disambiguate_location {
};
}
-sub example_places {
- return ( 'GU51 4JX', 'Primrose Drive' );
-}
-
sub categories_restriction {
my ($self, $rs) = @_;
return $rs->search( { category => { '!=' => 'Graffiti on bridges/subways' } } );
@@ -43,12 +39,6 @@ sub ask_ever_reported {
return 0;
}
-sub contact_email {
- my $self = shift;
- return join( '@', 'info', 'hart.gov.uk' );
-}
-sub contact_name { 'Hart District Council (do not reply)'; }
-
sub default_map_zoom { 3 }
sub reports_per_page { return 20; }
diff --git a/perllib/FixMyStreet/Cobrand/Hounslow.pm b/perllib/FixMyStreet/Cobrand/Hounslow.pm
index 491384847..1628715c6 100644
--- a/perllib/FixMyStreet/Cobrand/Hounslow.pm
+++ b/perllib/FixMyStreet/Cobrand/Hounslow.pm
@@ -8,16 +8,9 @@ sub council_area_id { 2483 }
sub council_area { 'Hounslow' }
sub council_name { 'Hounslow Highways' }
sub council_url { 'hounslow' }
-sub example_places { ( 'TW3 1SN', "Depot Road" ) }
sub map_type { 'Hounslow' }
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fms.hounslowhighways.org';
-}
-
sub enter_postcode_text {
my ($self) = @_;
return "Enter a Hounslow street name and area, or postcode";
@@ -52,11 +45,6 @@ sub get_geocoder {
sub on_map_default_status { 'open' }
-sub contact_email {
- my $self = shift;
- return join( '@', 'enquiries', $self->council_url . 'highways.org' );
-}
-
sub send_questionnaires { 0 }
sub enable_category_groups { 1 }
diff --git a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
index 2506772b3..3b731b273 100644
--- a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
@@ -1,5 +1,5 @@
package FixMyStreet::Cobrand::Lincolnshire;
-use parent 'FixMyStreet::Cobrand::UKCouncils';
+use parent 'FixMyStreet::Cobrand::Whitelabel';
use strict;
use warnings;
@@ -29,23 +29,6 @@ sub enter_postcode_text {
return 'Enter a Lincolnshire 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.lincolnshire.gov.uk';
-}
-
-sub contact_email {
- my $self = shift;
- return join( '@', 'confirm_support', 'lincolnshire.gov.uk' );
-}
-
-
-sub example_places {
- return ( 'LN1 1YL', 'Orchard Street, Lincoln' );
-}
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
index 683dc059c..3d5d4b6f2 100644
--- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
@@ -12,16 +12,8 @@ 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;
@@ -51,11 +43,6 @@ sub problems_on_map_restriction {
return $self->problems_restriction($rs);
}
-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'
}
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
index 845536bb1..72a56f46c 100644
--- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -37,12 +37,6 @@ sub is_council_with_case_management {
return FixMyStreet->config('STAGING_SITE');
}
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'https://fixmystreet.oxfordshire.gov.uk';
-}
-
sub enter_postcode_text {
my ($self) = @_;
return 'Enter an Oxfordshire postcode, or street name and area';
@@ -60,10 +54,6 @@ sub disambiguate_location {
};
}
-sub example_places {
- return ( 'OX20 1SZ', 'Park St, Woodstock' );
-}
-
# don't send questionnaires to people who used the OCC cobrand to report their problem
sub send_questionnaires { return 0; }
@@ -156,11 +146,6 @@ sub should_skip_sending_update {
sub on_map_default_status { return 'open'; }
-sub contact_email {
- my $self = shift;
- return join( '@', 'highway.enquiries', 'oxfordshire.gov.uk' );
-}
-
sub admin_user_domain { 'oxfordshire.gov.uk' }
sub traffic_management_options {
diff --git a/perllib/FixMyStreet/Cobrand/Rutland.pm b/perllib/FixMyStreet/Cobrand/Rutland.pm
index af635ac59..407d43d14 100644
--- a/perllib/FixMyStreet/Cobrand/Rutland.pm
+++ b/perllib/FixMyStreet/Cobrand/Rutland.pm
@@ -35,10 +35,6 @@ sub open311_config {
$params->{multi_photos} = 1;
}
-sub example_places {
- return ( 'LE15 6HP', 'High Street', 'Oakham' );
-}
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Stevenage.pm b/perllib/FixMyStreet/Cobrand/Stevenage.pm
index 28734b14b..9b0e91016 100644
--- a/perllib/FixMyStreet/Cobrand/Stevenage.pm
+++ b/perllib/FixMyStreet/Cobrand/Stevenage.pm
@@ -10,12 +10,6 @@ sub council_name { return 'Stevenage Council'; }
sub council_url { return 'stevenage'; }
sub is_two_tier { return 1; }
-sub base_url {
- my $self = shift;
- return $self->next::method() if FixMyStreet->config('STAGING_SITE');
- return 'http://fixmystreet.stevenage.gov.uk';
-}
-
sub disambiguate_location {
my $self = shift;
return {
@@ -27,18 +21,9 @@ sub disambiguate_location {
};
}
-sub example_places {
- return [ 'SG1 1HN', 'Lyton Way' ];
-}
-
sub default_map_zoom { return 3; }
sub users_can_hide { return 1; }
-sub contact_email {
- my $self = shift;
- return join( '@', 'csc', 'stevenage.gov.uk' );
-}
-
1;
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm
index da0356664..fde5f465a 100644
--- a/perllib/FixMyStreet/Cobrand/UK.pm
+++ b/perllib/FixMyStreet/Cobrand/UK.pm
@@ -140,6 +140,13 @@ sub find_closest {
sub reports_body_check {
my ( $self, $c, $code ) = @_;
+ # Deal with Bexley name not starting with short name
+ if ($code =~ /bexley/i) {
+ my $body = $c->model('DB::Body')->search( { name => { -like => "%$code%" } } )->single;
+ $c->stash->{body} = $body;
+ return $body;
+ }
+
# Manual misspelling redirect
if ($code =~ /^rhondda cynon taff$/i) {
my $url = $c->uri_for( '/reports/Rhondda+Cynon+Taf' );
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index c21ed6401..f17593095 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -110,7 +110,11 @@ sub users_restriction {
sub base_url {
my $self = shift;
- my $base_url = FixMyStreet->config('BASE_URL');
+
+ my $base_url = $self->feature('base_url');
+ return $base_url if $base_url;
+
+ $base_url = FixMyStreet->config('BASE_URL');
my $u = $self->council_url;
if ( $base_url !~ /$u/ ) {
$base_url =~ s{(https?://)(?!www\.)}{$1$u.}g;
@@ -119,6 +123,11 @@ sub base_url {
return $base_url;
}
+sub example_places {
+ my $self = shift;
+ return $self->feature('example_places') || $self->next::method();
+}
+
sub enter_postcode_text {
my ($self) = @_;
return 'Enter a ' . $self->council_area . ' postcode, or street name and area';
@@ -325,6 +334,16 @@ sub lookup_site_code {
return $site_code;
}
+sub contact_name {
+ my $self = shift;
+ return $self->feature('contact_name') || $self->next::method();
+}
+
+sub contact_email {
+ my $self = shift;
+ return $self->feature('contact_email') || $self->next::method();
+}
+
sub extra_contact_validation {
my $self = shift;
my $c = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Warwickshire.pm b/perllib/FixMyStreet/Cobrand/Warwickshire.pm
index c301450bc..ff28bc8b3 100644
--- a/perllib/FixMyStreet/Cobrand/Warwickshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Warwickshire.pm
@@ -22,16 +22,6 @@ sub disambiguate_location {
};
}
-sub example_places {
- return [ 'CV34 4RL', 'Stratford Rd' ];
-}
-
-sub contact_email {
- my $self = shift;
- return join( '@', 'fmstest', 'warwickshire.gov.uk' );
-}
-sub contact_name { 'Warwickshire County Council (do not reply)'; }
-
sub send_questionnaires { 0 }
sub open311_contact_meta_override {
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm
index 9424eaf03..7251bc863 100644
--- a/perllib/FixMyStreet/DB/Result/Body.pm
+++ b/perllib/FixMyStreet/DB/Result/Body.pm
@@ -215,6 +215,22 @@ sub get_cobrand_handler {
return FixMyStreet::Cobrand->body_handler($self->areas);
}
+=item
+
+If get_cobrand_handler returns a cobrand, and that cobrand
+has a council_name, use it in preference to the body name.
+
+=cut
+
+sub cobrand_name {
+ my $self = shift;
+ my $handler = $self->get_cobrand_handler;
+ if ($handler && $handler->can('council_name')) {
+ return $handler->council_name;
+ }
+ return $self->name;
+}
+
sub calculate_average {
my ($self, $threshold) = @_;
$threshold ||= 0;
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 5d0253ef4..39f446549 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -229,6 +229,8 @@ sub meta_line {
$body = "$body <img src='/cobrands/bromley/favicon.png' alt=''>";
} elsif ($body eq 'Royal Borough of Greenwich') {
$body = "$body <img src='/cobrands/greenwich/favicon.png' alt=''>";
+ } elsif ($body eq 'Hounslow Borough Council') {
+ $body = 'Hounslow Highways';
}
}
my $cobrand_always_view_body_user = $c->cobrand->call_hook("always_view_body_contribute_details");
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index dc45091ee..c1608b35d 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -755,7 +755,7 @@ sub defect_types {
# Note: this only makes sense when called on a problem that has been sent!
sub can_display_external_id {
my $self = shift;
- if ($self->external_id && $self->send_method_used && $self->to_body_named('Oxfordshire|Lincolnshire')) {
+ if ($self->external_id && $self->to_body_named('Oxfordshire|Lincolnshire')) {
return 1;
}
return 0;