aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/hounslow/js.js
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-06-24 17:30:30 +0100
committerDave Arter <davea@mysociety.org>2019-07-09 20:26:38 +0100
commit0948389e5676300317bf49be14c0e7b8b48e8315 (patch)
treec44c6550437ef6e857fd715835ee7e906df75069 /web/cobrands/hounslow/js.js
parent0ea7e84beeea32c51b3592fcacd5824552dba15d (diff)
Update UI text when selecting a private category
This makes it clearer that all details for a report made in a private category will not be shown publicly. Fixes mysociety/fixmystreet-commercial#1405
Diffstat (limited to 'web/cobrands/hounslow/js.js')
-rw-r--r--web/cobrands/hounslow/js.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/web/cobrands/hounslow/js.js b/web/cobrands/hounslow/js.js
index e8772b691..7bd9fb91c 100644
--- a/web/cobrands/hounslow/js.js
+++ b/web/cobrands/hounslow/js.js
@@ -20,11 +20,14 @@ if (fixmystreet.cobrand == 'hounslow') {
// as the destination for reports in the "Public details" section.
// This is OK because the cobranded site only shows categories which
// Hounslow Highways 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 "Hounslow Highways" 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, ['Hounslow Highways']);
+ };
}
})();