diff options
Diffstat (limited to 'web/cobrands/isleofwight/js.js')
-rw-r--r-- | web/cobrands/isleofwight/js.js | 13 |
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'; |