aboutsummaryrefslogtreecommitdiffstats
path: root/web
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 /web
parent640de422fb8db9c2fbc604dbb3674eb0cea99ba0 (diff)
parentd8429c3760e829567a769d3e9e08bdac1f6a1ffc (diff)
Merge branch 'bucks-roads-message-tweak'
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/buckinghamshire/assets.js19
1 files changed, 18 insertions, 1 deletions
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();
}
}