aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-12-11 13:13:14 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-12-11 16:55:06 +0000
commitd8429c3760e829567a769d3e9e08bdac1f6a1ffc (patch)
tree953da6a80bebe9fe63b256c53492071233cc6ed4 /web
parentcb7483370b3eaa1b6e153882f468cf6c14a1a9b0 (diff)
[Buckinghamshire] Nicer not-our-road messages.
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();
}
}