aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-05-17 11:58:56 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-28 15:36:25 +0100
commitc21921e58dd487be90e496a325168b2f2093b0ff (patch)
tree828b35ffea6f5500193c253d12796d5fbafa49ef
parent303af58ad5088b21cceb1f9b989763b343fce0a7 (diff)
Allow stopper to keep showing category extras.
-rw-r--r--templates/web/base/report/new/category_wrapper.html2
-rw-r--r--web/cobrands/fixmystreet/assets.js9
2 files changed, 8 insertions, 3 deletions
diff --git a/templates/web/base/report/new/category_wrapper.html b/templates/web/base/report/new/category_wrapper.html
index 33c6813f9..6cbb55229 100644
--- a/templates/web/base/report/new/category_wrapper.html
+++ b/templates/web/base/report/new/category_wrapper.html
@@ -19,7 +19,7 @@
[% PROCESS "report/new/duplicate_suggestions.html" %]
-<div id="js-post-category-messages" class="js-hide-if-invalid-category">
+<div id="js-post-category-messages" class="js-hide-if-invalid-category_extras">
[%# This section includes 'Pick an asset' text, roadworks info, extra category questions %]
[%- IF category_extras OR report_extra_fields %]
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index f68ad6caf..1d2bc3206 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -936,11 +936,16 @@ fixmystreet.message_controller = (function() {
// This shows the reporting form
function enable_report_form() {
$(".js-hide-if-invalid-category").show();
+ $(".js-hide-if-invalid-category_extras").show();
}
// This hides the reporting form, apart from the category selection
- function disable_report_form() {
+ // And perhaps the category_extras unless asked not to
+ function disable_report_form(keep_category_extras) {
$(".js-hide-if-invalid-category").hide();
+ if (!keep_category_extras) {
+ $(".js-hide-if-invalid-category_extras").hide();
+ }
}
// This hides the responsibility message, and (unless a
@@ -1028,7 +1033,7 @@ fixmystreet.message_controller = (function() {
} else {
$msg.insertBefore('#js-post-category-messages');
}
- disable_report_form();
+ disable_report_form(stopper.keep_category_extras);
});
return {