diff options
-rw-r--r-- | templates/web/buckinghamshire/report/new/form_heading.html | 2 | ||||
-rw-r--r-- | web/cobrands/buckinghamshire/assets.js | 12 | ||||
-rw-r--r-- | web/cobrands/buckinghamshire/base.scss | 5 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/assets.js | 3 | ||||
-rw-r--r-- | web/cobrands/highways/assets.js | 9 |
5 files changed, 29 insertions, 2 deletions
diff --git a/templates/web/buckinghamshire/report/new/form_heading.html b/templates/web/buckinghamshire/report/new/form_heading.html index 0b3246472..81bff156a 100644 --- a/templates/web/buckinghamshire/report/new/form_heading.html +++ b/templates/web/buckinghamshire/report/new/form_heading.html @@ -1,4 +1,4 @@ -<p> +<p id="bucks_dangerous_msg"> <strong>IMPORTANT:</strong> If you consider this to be dangerous or an emergency, please call us on: <strong>01296 382416</strong> (09:00 – 17:30 Mon-Thurs, 09:00 – 17:00 Friday) diff --git a/web/cobrands/buckinghamshire/assets.js b/web/cobrands/buckinghamshire/assets.js index 541bdfc57..220454903 100644 --- a/web/cobrands/buckinghamshire/assets.js +++ b/web/cobrands/buckinghamshire/assets.js @@ -156,6 +156,18 @@ function is_only_body(body) { return false; } +$(fixmystreet).on('report_new:highways_change', function() { + if (fixmystreet.body_overrides.get_only_send() === 'Highways England') { + hide_responsibility_errors(); + enable_report_form(); + $('#bucks_dangerous_msg').hide(); + } else { + $('#bucks_dangerous_msg').show(); + $(fixmystreet).trigger('report_new:category_change', [ $('#form_category') ]); + } +}); + + fixmystreet.assets.add($.extend(true, {}, defaults, { http_options: { params: { diff --git a/web/cobrands/buckinghamshire/base.scss b/web/cobrands/buckinghamshire/base.scss index 389ca4506..0d3e6ec74 100644 --- a/web/cobrands/buckinghamshire/base.scss +++ b/web/cobrands/buckinghamshire/base.scss @@ -91,3 +91,8 @@ label { #map #drag .square-map__tile { position: static; } + +// uses important because btn also uses it +#highways .segmented-control--radio input:checked + label.btn { + color: $g7 !important; +} diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index efb827656..036302cab 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -807,6 +807,9 @@ return { allow_send: function(body) { do_not_send = $.grep(do_not_send, function(a) { return a !== body; }); update(); + }, + get_only_send: function() { + return only_send; } }; diff --git a/web/cobrands/highways/assets.js b/web/cobrands/highways/assets.js index 4b6939693..f6bf3ad32 100644 --- a/web/cobrands/highways/assets.js +++ b/web/cobrands/highways/assets.js @@ -68,7 +68,9 @@ fixmystreet.assets.add($.extend(true, {}, defaults, { }, not_found: function(layer) { fixmystreet.body_overrides.location = null; - fixmystreet.body_overrides.remove_only_send(); + if (fixmystreet.body_overrides.get_only_send() === 'Highways England') { + fixmystreet.body_overrides.remove_only_send(); + } $('#highways').remove(); } } @@ -87,6 +89,7 @@ function add_highways_warning(road_name) { .on('click', function() { fixmystreet.body_overrides.location = null; fixmystreet.body_overrides.only_send('Highways England'); + $(fixmystreet).trigger('report_new:highways_change'); }) .appendTo($radios); $('<label>') @@ -104,6 +107,7 @@ function add_highways_warning(road_name) { longitude: $('#fixmystreet\\.longitude').val() }; fixmystreet.body_overrides.remove_only_send(); + $(fixmystreet).trigger('report_new:highways_change'); }) .appendTo($radios); $('<label>') @@ -113,6 +117,9 @@ function add_highways_warning(road_name) { .appendTo($radios); $radios.appendTo($warning); $('.change_location').after($warning); + fixmystreet.body_overrides.location = null; + fixmystreet.body_overrides.only_send('Highways England'); + $(fixmystreet).trigger('report_new:highways_change'); } })(); |