aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-12-13 09:18:47 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-12-13 09:18:47 +0000
commit8dbc6699e697ddbf06ea85e28804cf2c085826d0 (patch)
tree97aa3a3c234296ac6cfcec8fc9cd220e13bd9716
parent640de422fb8db9c2fbc604dbb3674eb0cea99ba0 (diff)
parentd8429c3760e829567a769d3e9e08bdac1f6a1ffc (diff)
Merge branch 'bucks-roads-message-tweak'
-rw-r--r--templates/web/buckinghamshire/report/new/roads_message.html20
-rw-r--r--templates/web/fixmystreet.com/report/new/roads_message.html14
-rw-r--r--web/cobrands/buckinghamshire/assets.js19
3 files changed, 46 insertions, 7 deletions
diff --git a/templates/web/buckinghamshire/report/new/roads_message.html b/templates/web/buckinghamshire/report/new/roads_message.html
index e518e963c..c195f6b52 100644
--- a/templates/web/buckinghamshire/report/new/roads_message.html
+++ b/templates/web/buckinghamshire/report/new/roads_message.html
@@ -1,8 +1,22 @@
<div id="js-roads-responsibility" class="box-warning hidden">
- <strong>Invalid location</strong>
+ <strong>Not maintained by Buckinghamshire County Council</strong>
<div id="js-not-council-road" class="hidden js-responsibility-message">
- <p>The selected road is not maintained by Buckinghamshire County Council.</p>
- <p>Please select another road.</p>
+ <p>The selected road is not maintained by Buckinghamshire County Council;
+ to find out who owns this land/road please contact the Land Registry at
+ <a href="https://www.gov.uk/search-property-information-land-registry">https://www.gov.uk/search-property-information-land-registry</a>.
+ </p>
+ </div>
+ <div id="js-not-council-road-other" class="hidden js-responsibility-message">
+ <p>The selected road is not maintained by Buckinghamshire County Council,
+ but by a neighbouring council. Please move your pin slightly, to the
+ other side of the border.
+ </p>
+ </div>
+ <div id="js-not-council-road-he" class="hidden js-responsibility-message">
+ <p>The selected road is not maintained by Buckinghamshire County Council,
+ but by Highways England. Please follow this link to
+ <a class="js-update-coordinates" href="https://www.fixmystreet.com/report/new?latitude=[% latitude |html %]&amp;longitude=[% longitude | html %]">FixMyStreet</a> to continue reporting your issue here.
+ </p>
</div>
<div id="js-not-a-road" class="hidden js-responsibility-message">
<p>The location you have selected doesn't appear to be on a road.</p>
diff --git a/templates/web/fixmystreet.com/report/new/roads_message.html b/templates/web/fixmystreet.com/report/new/roads_message.html
index da32d5a97..a0a55e707 100644
--- a/templates/web/fixmystreet.com/report/new/roads_message.html
+++ b/templates/web/fixmystreet.com/report/new/roads_message.html
@@ -1,8 +1,16 @@
<div id="js-roads-responsibility" class="box-warning hidden">
- <strong>Invalid location</strong>
+ <strong>Not maintained by the council</strong>
<div id="js-not-council-road" class="hidden js-responsibility-message">
- <p>The selected road is not maintained by the Council.</p>
- <p>Please select another road.</p>
+ <p>The selected road is not maintained by the council;
+ to find out who owns this land/road please contact the Land Registry at
+ <a href="https://www.gov.uk/search-property-information-land-registry">https://www.gov.uk/search-property-information-land-registry</a>.
+ </p>
+ </div>
+ <div id="js-not-council-road-other" class="hidden js-responsibility-message">
+ <p>The selected road is not maintained by the council,
+ but by a neighbouring council. Please move your pin slightly, to the
+ other side of the border.
+ </p>
</div>
<div id="js-not-a-road" class="hidden js-responsibility-message">
<p>The location you have selected doesn't appear to be on a road.</p>
diff --git a/web/cobrands/buckinghamshire/assets.js b/web/cobrands/buckinghamshire/assets.js
index c32da247c..cf08f6b1f 100644
--- a/web/cobrands/buckinghamshire/assets.js
+++ b/web/cobrands/buckinghamshire/assets.js
@@ -177,6 +177,16 @@ function show_responsibility_error(id) {
hide_responsibility_errors();
$("#js-roads-responsibility").removeClass("hidden");
$("#js-roads-responsibility .js-responsibility-message").addClass("hidden");
+ $('.js-update-coordinates').attr('href', function(i, href) {
+ if (href.indexOf('?') != -1) {
+ href = href.substring(0, href.indexOf('?'));
+ }
+ href += '?' + OpenLayers.Util.getParameterString({
+ latitude: $('#fixmystreet\\.latitude').val(),
+ longitude: $('#fixmystreet\\.longitude').val()
+ });
+ return href;
+ });
$(id).removeClass("hidden");
}
@@ -242,9 +252,16 @@ fixmystreet.assets.add($.extend(true, {}, defaults, {
enable_report_form();
} else {
// User has clicked a road that Bucks don't maintain.
+
+ var map = {
+ "HE": '#js-not-council-road-he',
+ "HWOA": '#js-not-council-road-other'
+ };
+
fixmystreet.body_overrides.do_not_send(layer.fixmystreet.body);
if (is_only_body(layer.fixmystreet.body)) {
- show_responsibility_error("#js-not-council-road");
+ var id = map[feature.attributes.feature_ty] || '#js-not-council-road';
+ show_responsibility_error(id);
disable_report_form();
}
}