aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js7
-rw-r--r--web/cobrands/hounslow/js.js13
-rw-r--r--web/cobrands/sass/_base.scss4
3 files changed, 19 insertions, 5 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 041d23c9e..d39b6a0e9 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -441,6 +441,13 @@ $.extend(fixmystreet.set_up, {
} else {
$category_meta.empty();
}
+ if (data && data.non_public) {
+ $(".js-hide-if-private-category").hide();
+ $(".js-hide-if-public-category").show();
+ } else {
+ $(".js-hide-if-private-category").show();
+ $(".js-hide-if-public-category").hide();
+ }
// remove existing validation rules
validation_rules = fixmystreet.validator.settings.rules;
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']);
+ };
}
})();
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index ce81a8a08..8c1445b36 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -2103,6 +2103,10 @@ label .muted {
}
}
+.js-hide-if-public-category {
+ display: none;
+}
+
.asset-spot:before {
content: "";
display: inline-block;