aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/isleofwight/js.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2019-07-16 13:36:46 +0100
committerStruan Donald <struan@exo.org.uk>2019-09-27 17:35:15 +0100
commit3e82f19d86ca2c7766c85b189a568b1f84082d80 (patch)
treef84d282872927e7dadbb5cd1b94885164f44892f /web/cobrands/isleofwight/js.js
parent95b1ed2d8ec5b668cee8a998810e45908a9598a7 (diff)
[IsleOfWight] check name correct for private categories
Diffstat (limited to 'web/cobrands/isleofwight/js.js')
-rw-r--r--web/cobrands/isleofwight/js.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/web/cobrands/isleofwight/js.js b/web/cobrands/isleofwight/js.js
index 0665a99ba..d43006fd5 100644
--- a/web/cobrands/isleofwight/js.js
+++ b/web/cobrands/isleofwight/js.js
@@ -9,11 +9,14 @@ if (fixmystreet.cobrand == 'isleofwight') {
// as the destination for reports in the "Public details" section.
// This is OK because the cobranded site only shows categories which
// Island Roads actually handle.
- // Replacing this function with a no-op stops the changes made
- // to the cobranded councils_text_all.html from being clobbered and
- // the 'correct' (according to bodies set up within FMS) body names
- // being shown.
- fixmystreet.update_public_councils_text = function() {};
+ // To achieve this we ignore the passed list of bodies and always
+ // use "Island Roads" when calling the original function.
+ // NB calling the original function is required so that private categories
+ // cause the correct text to be shown in the UI.
+ var original_update_public_councils_text = fixmystreet.update_public_councils_text;
+ fixmystreet.update_public_councils_text = function(text, bodies) {
+ original_update_public_councils_text.call(this, text, ['Island Roads']);
+ };
}
var org_id = '1062';