aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/base/report/duplicate-no-updates.html2
-rw-r--r--templates/web/base/report/update-form.html2
-rw-r--r--templates/web/bromley/report/update-form.html2
-rw-r--r--web/cobrands/fixmystreet/staff.js11
-rw-r--r--web/cobrands/sass/_base.scss6
5 files changed, 20 insertions, 3 deletions
diff --git a/templates/web/base/report/duplicate-no-updates.html b/templates/web/base/report/duplicate-no-updates.html
index eb9ded728..c8020a107 100644
--- a/templates/web/base/report/duplicate-no-updates.html
+++ b/templates/web/base/report/duplicate-no-updates.html
@@ -1,5 +1,5 @@
<div>
- [% UNLESS hide_header %]<h2>[% loc( 'Provide an update') %]</h2>[% END %]
+ [% UNLESS hide_header %]<h2 class="update-form-heading">[% loc( 'Provide an update') %]</h2>[% END %]
<p>[% loc("This report is a duplicate. Please leave updates on the original report:") %]</p>
<ul class="item-list">
[% INCLUDE 'report/_item.html' item_extra_class = 'item-list__item--with-pin item-list--reports__item--selected' problem = problem.duplicate_of %]
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 49d011c0e..ea7b14970 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -3,7 +3,7 @@
<div id="update_form">
[% IF NOT login_success AND NOT oauth_need_email %]
- <h2>[% loc( 'Provide an update') %]</h2>
+ <h2 class="update-form-heading">[% loc( 'Provide an update') %]</h2>
[% IF c.cobrand.moniker != 'stevenage' %]
<div class="general-notes">
diff --git a/templates/web/bromley/report/update-form.html b/templates/web/bromley/report/update-form.html
index 99f8248e3..c54fab5a5 100644
--- a/templates/web/bromley/report/update-form.html
+++ b/templates/web/bromley/report/update-form.html
@@ -1,5 +1,5 @@
<div id="update_form">
- <h2>[% loc( 'Provide an update') %]</h2>
+ <h2 class="update-form-heading">[% loc( 'Provide an update') %]</h2>
[% INCLUDE 'errors.html' %]
diff --git a/web/cobrands/fixmystreet/staff.js b/web/cobrands/fixmystreet/staff.js
index 23d2a5a0d..b1bd9ee54 100644
--- a/web/cobrands/fixmystreet/staff.js
+++ b/web/cobrands/fixmystreet/staff.js
@@ -263,6 +263,17 @@ $.extend(fixmystreet.set_up, {
$("form#report_inspect_form input[name=longitude]").val(latlon.lon);
});
}
+
+ // Make the "Provide an update" form toggleable, and hide it by default.
+ // (Inspectors will normally just use the #public_update box instead).
+ var $updateFormH2 = $('.update-form-heading');
+ var $updateFormBtn = $('<button>').insertBefore( $updateFormH2 );
+ $updateFormH2.hide().nextAll().hide();
+ $updateFormBtn.addClass('btn btn--provide-update');
+ $updateFormBtn.text( $updateFormH2.text() );
+ $updateFormBtn.on('click', function(){
+ $updateFormH2.nextAll().toggle();
+ });
},
moderation: function() {
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index abdd178e9..7f629971e 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -837,6 +837,12 @@ input.final-submit {
}
}
+.btn--provide-update {
+ display: block;
+ width: 100%;
+ margin-bottom: 1em;
+}
+
.btn--block {
display: block;
text-align: center;