aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-11-14 12:57:52 +0000
committerDave Arter <davea@mysociety.org>2019-12-09 12:50:07 +0000
commit5ffe5b967e91d0660e10c762b31bef678fe5acc6 (patch)
treeb507d6c9ad30cc754c86edb4e4270d6f8ab01849
parent850e568e7ef3459f5bb1aba7d9d1fb374f3bede6 (diff)
[TfL] Put councils_text above category dropdown.
-rw-r--r--templates/web/base/report/new/form_public_councils_text.html11
-rw-r--r--templates/web/base/report/new/form_report.html17
-rw-r--r--templates/web/tfl/report/new/form_public_councils_text.html13
-rw-r--r--web/cobrands/tfl/js.js3
4 files changed, 35 insertions, 9 deletions
diff --git a/templates/web/base/report/new/form_public_councils_text.html b/templates/web/base/report/new/form_public_councils_text.html
new file mode 100644
index 000000000..a4cd5db49
--- /dev/null
+++ b/templates/web/base/report/new/form_public_councils_text.html
@@ -0,0 +1,11 @@
+[% BLOCK public_councils_text %]
+<h2 class="form-section-heading js-hide-if-private-category">[% loc( 'Public details' ) %]</h2>
+<h2 class="form-section-heading form-section-heading--private js-hide-if-public-category hidden-js">[% loc( 'Report details' ) %]</h2>
+<div class="form-section-description" id="js-councils_text">
+ [% IF js %]
+ [% PROCESS 'report/new/councils_text_all.html' list_of_names = [ loc('the local council') ] %]
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text.html' %]
+ [% END %]
+</div>
+[% END %]
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html
index 9f99b86c3..d6112703c 100644
--- a/templates/web/base/report/new/form_report.html
+++ b/templates/web/base/report/new/form_report.html
@@ -7,6 +7,11 @@
<p class='form-error'>[% field_errors.bodies %]</p>
[% END %]
+[% PROCESS 'report/new/form_public_councils_text.html' %]
+[% IF public_councils_text_at_top %]
+ [% INCLUDE public_councils_text %]
+[% END %]
+
[% PROCESS "report/new/category_wrapper.html" %]
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
@@ -22,15 +27,9 @@
<div class="js-hide-if-invalid-category[% ' hidden-nojs' IF form_show_category_only %]">
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]
- <h2 class="form-section-heading js-hide-if-private-category">[% loc( 'Public details' ) %]</h2>
- <h2 class="form-section-heading form-section-heading--private js-hide-if-public-category hidden-js">[% loc( 'Report details' ) %]</h2>
- <div class="form-section-description" id="js-councils_text">
- [% IF js %]
- [% PROCESS 'report/new/councils_text_all.html' list_of_names = [ loc('the local council') ] %]
- [% ELSE %]
- [% PROCESS 'report/new/councils_text.html' %]
- [% END %]
- </div>
+ [% UNLESS public_councils_text_at_top %]
+ [% INCLUDE public_councils_text %]
+ [% END %]
[% INCLUDE 'report/new/form_title.html' %]
diff --git a/templates/web/tfl/report/new/form_public_councils_text.html b/templates/web/tfl/report/new/form_public_councils_text.html
new file mode 100644
index 000000000..b84b29a16
--- /dev/null
+++ b/templates/web/tfl/report/new/form_public_councils_text.html
@@ -0,0 +1,13 @@
+[% public_councils_text_at_top = 1 %]
+[% BLOCK public_councils_text %]
+<div style="margin-top:1em">
+ <h2 class="form-section-heading form-section-heading--private js-hide-if-public-category hidden-js">[% loc( 'Report details' ) %]</h2>
+ <div class="form-section-description" id="js-councils_text">
+ [% IF js %]
+ [% PROCESS 'report/new/councils_text_all.html' list_of_names = [ loc('the local council') ] %]
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text.html' %]
+ [% END %]
+ </div>
+</div>
+[% END %]
diff --git a/web/cobrands/tfl/js.js b/web/cobrands/tfl/js.js
index 483e0d2ce..613c07231 100644
--- a/web/cobrands/tfl/js.js
+++ b/web/cobrands/tfl/js.js
@@ -1,5 +1,8 @@
(function(){
+translation_strings.name.validName = 'Please enter your full name, Transport for London needs this information – if you do not wish your name to be shown on the site, untick the box below';
+translation_strings.upload_default_message = 'Drag photo here to upload or <u>browse files</u>';
+
$(function() {
function update_category_group_label() {
var group = $("#report_inspect_form select#category option:selected").closest("optgroup").attr('label');