aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/SendReport/Email/Highways.pm8
-rw-r--r--t/app/sendreport/email/highways.t2
-rw-r--r--templates/web/highwaysengland/report/new/roads_message.html7
-rw-r--r--web/cobrands/highwaysengland/assets.js6
4 files changed, 10 insertions, 13 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email/Highways.pm b/perllib/FixMyStreet/SendReport/Email/Highways.pm
index 2bcd120d3..918ac896d 100644
--- a/perllib/FixMyStreet/SendReport/Email/Highways.pm
+++ b/perllib/FixMyStreet/SendReport/Email/Highways.pm
@@ -12,11 +12,9 @@ sub build_recipient_list {
my $contact = $self->fetch_category($body, $row) or return;
my $email = $contact->email;
my $area_name = $row->get_extra_field_value('area_name') || '';
- if ($area_name eq 'Area 7') {
- my $a7email = FixMyStreet->config('COBRAND_FEATURES') || {};
- $a7email = $a7email->{open311_email}->{highwaysengland}->{area_seven};
- $email = $a7email if $a7email;
- }
+ my $area_email = FixMyStreet->config('COBRAND_FEATURES') || {};
+ $area_email = $area_email->{open311_email}->{highwaysengland}->{$area_name};
+ $email = $area_email if $area_email;
@{$self->to} = map { [ $_, $body->name ] } split /,/, $email;
return 1;
diff --git a/t/app/sendreport/email/highways.t b/t/app/sendreport/email/highways.t
index b9a71f23f..22913a7e6 100644
--- a/t/app/sendreport/email/highways.t
+++ b/t/app/sendreport/email/highways.t
@@ -34,7 +34,7 @@ is $e->build_recipient_list($row), 1, 'correct recipient list count';
is_deeply $e->to, [ [ 'highways@example.com', 'Highways England' ] ], 'correct To line';
FixMyStreet::override_config {
- COBRAND_FEATURES => { open311_email => { highwaysengland => { area_seven => 'a7@example.com' } } }
+ COBRAND_FEATURES => { open311_email => { highwaysengland => { 'Area 7' => 'a7@example.com' } } }
}, sub {
$row->set_extra_fields( { name => 'area_name', value => 'Area 7' } );
is $e->build_recipient_list($row), 1, 'correct recipient list count';
diff --git a/templates/web/highwaysengland/report/new/roads_message.html b/templates/web/highwaysengland/report/new/roads_message.html
index e75a0a01b..d09845daf 100644
--- a/templates/web/highwaysengland/report/new/roads_message.html
+++ b/templates/web/highwaysengland/report/new/roads_message.html
@@ -7,10 +7,9 @@
</p>
</div>
- <div id="js-not-area7-road" class="hidden js-responsibility-message">
- <strong>This site is currently only for reports in the East Midlands</strong>
- <p>
- Please follow this link to
+ <div id="js-dbfo-road" class="hidden js-responsibility-message">
+ Whilst this site is being used to report on roads directly maintained
+ by Highways England, please follow this link to
<a class="js-update-coordinates" href="https://www.fixmystreet.com/report/new?latitude=[% latitude %]&amp;longitude=[% longitude %]">FixMyStreet</a> to continue reporting your issue.
</p>
</div>
diff --git a/web/cobrands/highwaysengland/assets.js b/web/cobrands/highwaysengland/assets.js
index 8e50ed396..5943cdffd 100644
--- a/web/cobrands/highwaysengland/assets.js
+++ b/web/cobrands/highwaysengland/assets.js
@@ -61,9 +61,9 @@ fixmystreet.assets.add(defaults, {
no_asset_msg_id: '#js-not-he-road',
actions: {
found: function(layer, feature) {
- // If the road isn't in area 7 then we want to show the not found message.
+ // If the road is a DBFO road then we want to show the not found message.
fixmystreet.message_controller.road_found(layer, feature, function(feature) {
- if (feature.attributes.area_name === 'Area 7') {
+ if (feature.attributes.area_name.indexOf('DBFO') === -1) {
$('#js-top-message').show();
$('#form_category_row').show();
return true;
@@ -72,7 +72,7 @@ fixmystreet.assets.add(defaults, {
$('#form_category_row').hide();
return false;
}
- }, '#js-not-area7-road');
+ }, '#js-dbfo-road');
},
not_found: function(layer) {
fixmystreet.message_controller.road_not_found(layer);