aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base')
-rwxr-xr-xtemplates/web/base/about/privacy.html14
-rw-r--r--templates/web/base/admin/bodies.html4
-rw-r--r--templates/web/base/admin/body-form.html2
-rw-r--r--templates/web/base/admin/body.html4
-rw-r--r--templates/web/base/admin/category-checkboxes.html2
-rw-r--r--templates/web/base/admin/config_page.html4
-rw-r--r--templates/web/base/admin/index.html4
-rw-r--r--templates/web/base/admin/list_updates.html6
-rw-r--r--templates/web/base/admin/open311-form-fields.html119
-rw-r--r--templates/web/base/admin/problem_row.html6
-rw-r--r--templates/web/base/admin/report-category.html6
-rw-r--r--templates/web/base/admin/report_edit.html12
-rw-r--r--templates/web/base/admin/stats/index.html3
-rw-r--r--templates/web/base/admin/template_edit.html22
-rw-r--r--templates/web/base/admin/templates.html5
-rw-r--r--templates/web/base/admin/update_edit.html3
-rw-r--r--templates/web/base/admin/user_import.html76
-rw-r--r--templates/web/base/around/_error_multiple.html11
-rw-r--r--templates/web/base/around/_postcode_form_post.html0
-rwxr-xr-xtemplates/web/base/around/_updates.html2
-rwxr-xr-xtemplates/web/base/around/display_location.html2
-rw-r--r--templates/web/base/around/index.html2
-rw-r--r--templates/web/base/around/postcode_form.html6
-rw-r--r--templates/web/base/auth/2faform.html2
-rw-r--r--templates/web/base/common_header_tags.html4
-rw-r--r--templates/web/base/common_scripts.html2
-rw-r--r--templates/web/base/contact/index.html16
-rwxr-xr-xtemplates/web/base/develop/email_list.html11
-rwxr-xr-x[-rw-r--r--]templates/web/base/footer.html0
-rw-r--r--templates/web/base/front/footer-marketing.html4
-rw-r--r--templates/web/base/front/stats.html12
-rw-r--r--templates/web/base/header.html3
-rw-r--r--templates/web/base/header_opengraph.html2
-rw-r--r--templates/web/base/main_nav.html5
-rw-r--r--templates/web/base/maps/google-ol.html2
-rw-r--r--templates/web/base/maps/osm.html1
-rw-r--r--templates/web/base/questionnaire/index.html42
-rw-r--r--templates/web/base/report/_inspect.html28
-rw-r--r--templates/web/base/report/_item.html3
-rw-r--r--templates/web/base/report/_show_name_label.html5
-rw-r--r--templates/web/base/report/_update_state.html24
-rw-r--r--templates/web/base/report/display.html4
-rw-r--r--templates/web/base/report/display_tools.html4
-rw-r--r--templates/web/base/report/nearby.html3
-rw-r--r--templates/web/base/report/new/category.html8
-rw-r--r--templates/web/base/report/new/category_extras.html27
-rw-r--r--templates/web/base/report/new/category_extras_fields.html6
-rw-r--r--templates/web/base/report/new/councils_text_all.html3
-rw-r--r--templates/web/base/report/new/fill_in_details_form.html2
-rw-r--r--templates/web/base/report/new/form_report.html14
-rw-r--r--templates/web/base/report/new/form_title.html7
-rw-r--r--templates/web/base/report/new/form_user_loggedin.html30
-rw-r--r--templates/web/base/report/new/form_user_loggedout_by_email.html30
-rw-r--r--templates/web/base/report/new/form_user_name.html10
-rw-r--r--templates/web/base/report/update-form.html8
-rw-r--r--templates/web/base/report/update.html23
-rw-r--r--templates/web/base/report/update/form_name.html5
-rw-r--r--templates/web/base/report/update/form_state_checkbox.html17
-rw-r--r--templates/web/base/report/update/form_update.html18
-rw-r--r--templates/web/base/report/updates.html2
-rw-r--r--templates/web/base/reports/_list-filters.html10
-rwxr-xr-xtemplates/web/base/reports/_ward-list.html19
-rwxr-xr-xtemplates/web/base/reports/body.html2
63 files changed, 499 insertions, 234 deletions
diff --git a/templates/web/base/about/privacy.html b/templates/web/base/about/privacy.html
index a794cfadf..de0fee32c 100755
--- a/templates/web/base/about/privacy.html
+++ b/templates/web/base/about/privacy.html
@@ -31,9 +31,17 @@ this. We use this information to, for example, remember you have logged in so
you don't need to do that on every page. Below, we list the cookies and
services that this site can use.
-<table cellpadding=5>
-<tr align="left"><th scope="col">Name</th><th scope="col">Typical Content</th><th scope="col">Expires</th></tr>
-<tr><td>fixmystreet_app_session</td><td nowrap>A random unique identifier</td><td>When browser is closed, or four weeks if &ldquo;Keep me signed in&rdquo; is ticked</td></tr>
+<table class="nicetable">
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">Typical Content</th>
+ <th scope="col">Expires</th>
+ </tr>
+ <tr>
+ <td>fixmystreet_app_session</td>
+ <td nowrap>A random unique identifier</td>
+ <td>When browser is closed, or four weeks if &ldquo;Keep me signed in&rdquo; is ticked</td>
+ </tr>
</table>
[% INCLUDE 'footer.html' pagefooter = 'yes' %]
diff --git a/templates/web/base/admin/bodies.html b/templates/web/base/admin/bodies.html
index 9bd85940b..9f4b81340 100644
--- a/templates/web/base/admin/bodies.html
+++ b/templates/web/base/admin/bodies.html
@@ -16,11 +16,11 @@
[% IF c.config.STAGING_SITE and !c.config.STAGING_FLAGS.send_reports %]
<p class="fms-admin-warning">
- [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='http://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %]
+ [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='https://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %]
</p>
[% END %]
- <table cellspacing="0" cellpadding="2" border="1">
+ <table cellspacing="0" cellpadding="2" border="1" id="admin_bodies">
<tr>
<th>[% loc('Name') %]</th>
[% IF c.cobrand.moniker == 'zurich' %]
diff --git a/templates/web/base/admin/body-form.html b/templates/web/base/admin/body-form.html
index 54445a282..958ea5d78 100644
--- a/templates/web/base/admin/body-form.html
+++ b/templates/web/base/admin/body-form.html
@@ -70,7 +70,7 @@
your config file is not pointing to a live MapIt service.") %]
[% END %]
<br>
- [% loc("For more information, see <a href='http://fixmystreet.org/customising/fms_and_mapit' class='admin-offsite-link'>How FixMyStreet uses Mapit</a>.")%]
+ [% loc("For more information, see <a href='https://fixmystreet.org/customising/fms_and_mapit' class='admin-offsite-link'>How FixMyStreet uses Mapit</a>.")%]
</p>
</div>
<p>
diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html
index 7fa446f44..2d77f10ce 100644
--- a/templates/web/base/admin/body.html
+++ b/templates/web/base/admin/body.html
@@ -61,13 +61,13 @@
</p>
[% ELSIF c.config.STAGING_SITE and !c.config.STAGING_FLAGS.send_reports %]
<p class="fms-admin-warning">
- [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='http://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %]
+ [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='https://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %]
</p>
[% END %]
<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
- <table cellspacing="0" cellpadding="2" border="1">
+ <table cellspacing="0" cellpadding="2" border="1" id="admin_contacts">
<tr>
<th>[% loc('Category') %]</th>
<th>[% loc('State') %]</th>
diff --git a/templates/web/base/admin/category-checkboxes.html b/templates/web/base/admin/category-checkboxes.html
index 63acd4112..f2167e955 100644
--- a/templates/web/base/admin/category-checkboxes.html
+++ b/templates/web/base/admin/category-checkboxes.html
@@ -9,7 +9,7 @@
</li>
[% FOR contact IN contacts %]
<li>
- <label>
+ <label title="[% contact.email | html %]">
<input type="checkbox" name="contacts[[% contact.id %]]" [% 'checked' IF contact.active %]/>
[% contact.category %]
</label>
diff --git a/templates/web/base/admin/config_page.html b/templates/web/base/admin/config_page.html
index d448d2a63..8e8d562ff 100644
--- a/templates/web/base/admin/config_page.html
+++ b/templates/web/base/admin/config_page.html
@@ -139,7 +139,7 @@ running version <strong>[% git_version || 'unknown' %]</strong>.
Other things can be changed on a cobrand basis by using functions in an
(optional) Cobrand .pm module, as explained in the
-<a href="http://fixmystreet.org/customising/" class="admin-offsite-link">customising section of our
+<a href="https://fixmystreet.org/customising/" class="admin-offsite-link">customising section of our
documentation</a>. If you wish to add new functionality just for your cobrand
that can't be done simply by changes to your cobrand's templates, you might
need to add a new Cobrand function.
@@ -147,7 +147,7 @@ need to add a new Cobrand function.
<p>Examples of cobrand functions are below; this is not exhaustive.
Many were added for one specific cobrand, so didn't need a general
configuration option. Please feel free to discuss on <a
-href="http://fixmystreet.org/community/" class="admin-offsite-link">our mailing list</a> if you think
+href="https://fixmystreet.org/community/" class="admin-offsite-link">our mailing list</a> if you think
something should be moved to the general.yml file, done differently,
or have any questions.</p>
diff --git a/templates/web/base/admin/index.html b/templates/web/base/admin/index.html
index 8498055b1..8691dbcf8 100644
--- a/templates/web/base/admin/index.html
+++ b/templates/web/base/admin/index.html
@@ -3,11 +3,11 @@
<div class="fms-admin-info fms-admin-floated">
This is the administration interface for [% site_name %]. If you
-need any help or guidance, there is <a href="http://fixmystreet.org/">plenty of
+need any help or guidance, there is <a href="https://fixmystreet.org/">plenty of
online documentation</a>. The FixMyStreet Platform is
<a href="https://github.com/mysociety/fixmystreet">actively supported</a> by
its developers, and has a community of people using or working on the code.
-Please <a href="http://fixmystreet.org/community/">sign up to the mailing list
+Please <a href="https://fixmystreet.org/community/">sign up to the mailing list
or get in touch</a> to let us know about your use of the FixMyStreet Platform,
and to receive notices of updates.
</div>
diff --git a/templates/web/base/admin/list_updates.html b/templates/web/base/admin/list_updates.html
index d759a2354..4b8b26d3c 100644
--- a/templates/web/base/admin/list_updates.html
+++ b/templates/web/base/admin/list_updates.html
@@ -39,7 +39,11 @@
<br>[% loc('Confirmed:') %] [% PROCESS format_time time=update.confirmed %]
</small></td>
<td>[% update.text | html %]</td>
- <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td>
+ <td>
+ [% IF c.user.has_permission_to('report_edit', update.problem.bodies_str_ids) %]
+ <a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a>
+ [% END %]
+ </td>
</tr>
[% END -%]
</table>
diff --git a/templates/web/base/admin/open311-form-fields.html b/templates/web/base/admin/open311-form-fields.html
index d1067205c..b716cf175 100644
--- a/templates/web/base/admin/open311-form-fields.html
+++ b/templates/web/base/admin/open311-form-fields.html
@@ -49,6 +49,17 @@
</p>
[% IF show_body_fields %]
+ <div class="admin-hint">
+ <p>
+ [% loc(
+ "Enabling this will suppress the error message that is normally emitted when an update has no description"
+ ) %]
+ </p>
+ </div>
+ <p>
+ <input type="checkbox" id="blank_updates_permitted" name="blank_updates_permitted"[% ' checked' IF object.blank_updates_permitted %]>
+ <label for="blank_updates_permitted" class="inline">[% loc('Permit blank updates') %]</label>
+ </p>
[%# These fields aren't shown for contacts %]
<div class="admin-hint">
<p>
@@ -65,48 +76,94 @@
<label for="send_comments" class="inline">[% loc('Use Open311 update-sending extension') %]</label>
</p>
- <div class="admin-hint">
- <p>
- [% loc(
- "If you've enabled Open311 update-sending above, you must identify which
- FixMyStreet <strong>user</strong> will be attributed as the creator of those updates
- when they are shown on the site. Enter the ID (number) of that user."
- ) %]
- </p>
+ <div class="admin-open311-section">
+ <div class="admin-hint">
+ <p>
+ [% loc(
+ "If you've enabled Open311 update-sending above, you must identify which
+ FixMyStreet <strong>user</strong> will be attributed as the creator of those updates
+ when they are shown on the site. Enter the ID (number) of that user."
+ ) %]
+ </p>
+ </div>
+ <p>
+ <label for"comment_user_id">[% loc('User ID to attribute fetched comments to') %]</label>
+ <input type="text" class="form-control" name="comment_user_id" value="[% object.comment_user_id %]">
+ [% IF object.comment_user_id %]
+ <a href="[% c.uri_for('user_edit', object.comment_user_id) %]">[% loc('edit user') %]</a>
+ [% END %]
+ </p>
+
+ <div class="admin-hint">
+ <p>
+ [% loc(
+ "If you've enabled Open311 update-sending above, enable <strong>suppression of alerts</strong>
+ if you do <strong>not</strong> want that user to be notified whenever these updates are created."
+ ) %]
+ </p>
+ </div>
+ <p>
+ <input type="checkbox" id="suppress_alerts" name="suppress_alerts"[% ' checked' IF object.suppress_alerts %]>
+ <label for="suppress_alerts" class="inline">[% loc('Do not send email alerts on fetched comments to problem creator') %]</label>
+ </p>
+
+ <div class="admin-hint">
+ <p>
+ [% loc(
+ "If you've enabled Open311 update-sending above, Open311 usually only accepts OPEN or CLOSED status in
+ its updates. Enable <strong>extended Open311 stauses</strong> if you want to allow extra states to be passed.
+ Check that your cobrand supports this feature before switching it on."
+ ) %]
+ </p>
+ </div>
+ <p>
+ <input type="checkbox" id="send_extended_statuses" name="send_extended_statuses"[% ' checked' IF object.send_extended_statuses %]>
+ <label for="send_extended_statuses" class="inline">[% loc('Send extended Open311 statuses with service request updates') %]</label>
+ </p>
</div>
- <p>
- <label for"comment_user_id">[% loc('User ID to attribute fetched comments to') %]</label>
- <input type="text" class="form-control" name="comment_user_id" value="[% object.comment_user_id %]">
- [% IF object.comment_user_id %]
- <a href="[% c.uri_for('user_edit', object.comment_user_id) %]">[% loc('edit user') %]</a>
- [% END %]
- </p>
<div class="admin-hint">
<p>
[% loc(
- "If you've enabled Open311 update-sending above, enable <strong>suppression of alerts</strong>
- if you do <strong>not</strong> want that user to be notified whenever these updates are created."
+ "Enable <strong>Open311 problem-fetching</strong> if you want to display reports created at
+ the endpoint to FixMyStreet. If you're not sure, you probably do not, so leave this unchecked.
+ For more information, see
+ <a href='https://www.mysociety.org/2013/02/20/open311-extended/' class='admin-offsite-link'>this article</a>."
) %]
</p>
</div>
<p>
- <input type="checkbox" id="suppress_alerts" name="suppress_alerts"[% ' checked' IF object.suppress_alerts %]>
- <label for="suppress_alerts" class="inline">[% loc('Do not send email alerts on fetched comments to problem creator') %]</label>
+ <input type="checkbox" id="fetch_problems" name="fetch_problems"[% ' checked' IF object.fetch_problems %]>
+ <label for="fetch_problems" class="inline">[% loc('Use Open311 problem fetching') %]</label>
</p>
- <div class="admin-hint">
- <p>
- [% loc(
- "If you've enabled Open311 update-sending above, Open311 usually only accepts OPEN or CLOSED status in
- its updates. Enable <strong>extended Open311 stauses</strong> if you want to allow extra states to be passed.
- Check that your cobrand supports this feature before switching it on."
- ) %]
- </p>
+ <div class="admin-open311-section">
+ <div class="admin-hint">
+ <p>
+ [% loc(
+ "Enable <strong>Convert location from Easting/Northing</strong> if you've enabled Open311 problem-fetching above
+ and problems fetching from the endpoint have the location in Easting/Northings and not Latitude/Longitude."
+ ) %]
+ </p>
+ </div>
+ <p>
+ <input type="checkbox" id="convert_latlong" name="convert_latlong"[% ' checked' IF object.convert_latlong %]>
+ <label for="convert_latlong" class="inline">[% loc('Convert location from Easting/Northing') %]</label>
+ </p>
+
+ <div class="admin-hint">
+ <p>
+ [% loc(
+ "Enable <strong>Always fetch all problems</strong> if you've enabled Open311 problem-fetching above
+ and the endpoint always returns a list of all problems. This will suppress error messages about
+ bad dates in the problems fetched."
+ ) %]
+ </p>
+ </div>
+ <p>
+ <input type="checkbox" id="fetch_all_problems" name="fetch_all_problems"[% ' checked' IF object.get_extra_metadata('fetch_all_problems') %]>
+ <label for="fetch_all_problems" class="inline">[% loc('Always fetch all problems') %]</label>
+ </p>
</div>
- <p>
- <input type="checkbox" id="send_extended_statuses" name="send_extended_statuses"[% ' checked' IF object.send_extended_statuses %]>
- <label for="send_extended_statuses" class="inline">[% loc('Send extended Open311 statuses with service request updates') %]</label>
- </p>
[% END %]
</div>
diff --git a/templates/web/base/admin/problem_row.html b/templates/web/base/admin/problem_row.html
index 446e94d66..99142af4e 100644
--- a/templates/web/base/admin/problem_row.html
+++ b/templates/web/base/admin/problem_row.html
@@ -38,6 +38,10 @@
[%- IF problem.is_closed %]<br>[% prettify_state('closed') %]: [% PROCESS format_time time=problem.lastupdate %][% END -%]
[%- IF problem.is_open %]<br>[% loc('Last&nbsp;update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
</small></td>
- <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
+ <td>
+ [% IF c.user.has_permission_to('report_edit', problem.bodies_str_ids) %]
+ <a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a>
+ [% END %]
+ </td>
</tr>
[%- END -%]
diff --git a/templates/web/base/admin/report-category.html b/templates/web/base/admin/report-category.html
index a2290089b..0416d71c0 100644
--- a/templates/web/base/admin/report-category.html
+++ b/templates/web/base/admin/report-category.html
@@ -4,10 +4,10 @@
<option selected value="[% problem.category | html %]">[% (problem.category_display OR '-') | html %]</option>
</optgroup>
[% END %]
- [% IF category_options_copy.size %]
+ [% IF category_options.size %]
<optgroup label="[% loc('Available categories') %]">
- [% FOREACH cat IN category_options_copy %]
- <option value="[% cat.name | html %]"[% ' selected' IF problem.category == cat.name %]>[% cat.value | html %]</option>
+ [% FOREACH cat IN category_options %]
+ <option value="[% cat.category | html %]"[% ' selected' IF problem.category == cat.category %]>[% cat.category_display | html %]</option>
[% END %]
</optgroup>
[% END %]
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index 911f4094e..10eb0eea1 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -1,4 +1,5 @@
[%
+ PROCESS "report/photo-js.html" IF problem.photo;
PROCESS "maps/${map.type}.html" admin = 1;
SET bodyclass = 'mappage with-notes';
INCLUDE 'admin/header.html'
@@ -91,7 +92,6 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
<li>[% loc('Cobrand:') %] [% problem.cobrand %]
<br><small>[% loc('Cobrand data:') %] [% cobrand_data OR '<em>' _ loc('None') _ '</em>' %]</small>
</li>
-<li>[% loc('Extra data:') %] [% problem.extra ? 'Yes' : 'No' %]</li>
<li>[% loc('Going to send questionnaire?') %] [% IF problem.send_questionnaire %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</li>
<li><label for="external_id">[% loc('External ID') %]:</label>
@@ -101,6 +101,12 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
<li><label for="external_team">[% loc('External team') %]:</label>
<input type="text" class="form-control" name="external_team" team="external_team" value="[% problem.external_team | html %]">
+[% IF problem.get_extra_metadata('external_status_code') %]
+<li>
+ <label for="external_status_code">[% loc('External status code') %]:</label>
+ <span>[% problem.get_extra_metadata('external_status_code') %]</span>
+</li>
+[% END %]
</ul>
</div>
@@ -119,6 +125,7 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
<li><label class="inline-text" for="category">[% loc('Category:') %]</label>
[% INCLUDE 'admin/report-category.html' %]
</li>
+<li>[% loc('Extra data:') %] [% IF extra_fields.size %]<ul>[% FOREACH field IN extra_fields %]<li><strong>[% field.name %]</strong>: [% field.val %]</li>[% END %]</ul>[% ELSE %]No[% END %]</li>
<li><label class="inline-text" for="anonymous">[% loc('Anonymous:') %]</label>
<select class="form-control" name="anonymous" id="anonymous">
<option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option>
@@ -165,6 +172,9 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
</li>
[% END %]
+<li><label class="inline-text" for="closed_updates">[% loc('Closed to updates') %]:</label>
+ <input type="checkbox" id="closed_updates" name="closed_updates"[% ' checked' IF problem.extra.closed_updates %]></li>
+
</ul>
<input type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]">
</form>
diff --git a/templates/web/base/admin/stats/index.html b/templates/web/base/admin/stats/index.html
index 6ea1ae403..d47054427 100644
--- a/templates/web/base/admin/stats/index.html
+++ b/templates/web/base/admin/stats/index.html
@@ -5,6 +5,9 @@
<li><a href="[% c.uri_for_action('admin/stats/state') %]">[% loc('Problem breakdown by state') %]</a></li>
<li><a href="[% c.uri_for_action('admin/stats/fix_rate') %]">[% loc('Category fix rate for problems > 4 weeks old') %]</a></li>
<li><a href="[% c.uri_for_action('dashboard/index') %]">[% loc('Summary statistics') %]</a></li>
+[% IF c.cobrand.moniker == 'fixmystreet' %]
+<li><a href="[% c.uri_for_action('admin/stats/refused') %]">Refused</a></li>
+[% END %]
</ul>
[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html
index 3e436dbf9..0cfd5406a 100644
--- a/templates/web/base/admin/template_edit.html
+++ b/templates/web/base/admin/template_edit.html
@@ -21,7 +21,7 @@
</div>
<p>
<strong>[% loc('Title:') %] </strong>
- <input type="text" name="title" class="required form-control" size="30" value="[% rt.title| html %]">
+ <input type="text" name="title" class="required form-control" size="30" value="[% rt.title | html %]">
</p>
<div class="admin-hint">
@@ -31,7 +31,7 @@
</div>
<p>
<strong>[% loc('Text:') %] </strong>
- <textarea class="form-control" name="text" class="required">[% rt.text |html %]</textarea>
+ <textarea class="form-control" name="text" class="required">[% rt.text | html %]</textarea>
</p>
<div class="admin-hint">
@@ -41,6 +41,9 @@
</div>
[% INCLUDE 'admin/category-checkboxes.html' %]
+ [% IF errors.state %]
+ <div class="form-error">[% errors.state %]</div>
+ [% END %]
<div class="admin-hint">
<p>
[% loc('If you want to use this template to prefill the update field when changing a report&rsquo;s state, select the state here.') %]
@@ -48,7 +51,20 @@
</div>
<p>
<label for="state">[% loc('State') %]</label>
- [% INCLUDE 'admin/state_groups_select.html' current_state=rt.state include_empty=1 %]
+ [% INCLUDE 'report/inspect/state_groups_select.html' current_state=rt.state include_empty=1 %]
+ </p>
+
+ [% IF errors.external_status_code %]
+ <div class="form-error">[% errors.external_status_code %]</div>
+ [% END %]
+ <div class="admin-hint">
+ <p>
+ [% loc('If you want to use this template to prefill the update field when a report&rsquo;s <strong>external</strong> (e.g. Confirm) status code changes, enter the status code here.') %]
+ </p>
+ </div>
+ <p>
+ <label for="external_status_code">[% loc('External status code') %]</label>
+ <input type="text" name="external_status_code" class="form-control" size="30" value="[% rt.external_status_code | html %]">
</p>
[% IF errors.auto_response %]
diff --git a/templates/web/base/admin/templates.html b/templates/web/base/admin/templates.html
index 444f2734d..21e4eea25 100644
--- a/templates/web/base/admin/templates.html
+++ b/templates/web/base/admin/templates.html
@@ -23,7 +23,10 @@
[% END %]
[% END %]
</td>
- <td> [% t.state | html %] </td>
+ <td>
+ [% IF t.state %][% t.state | html %][% END %]
+ [% IF t.external_status_code %][% t.external_status_code | html %] (external)[% END %]
+ </td>
<td> [% IF t.auto_response %]X[% END %] </td>
<td> <a href="[% c.uri_for('templates', body.id, t.id) %]" class="btn">[% loc('Edit') %]</a> </td>
</tr>
diff --git a/templates/web/base/admin/update_edit.html b/templates/web/base/admin/update_edit.html
index 34e64310f..cb420fc67 100644
--- a/templates/web/base/admin/update_edit.html
+++ b/templates/web/base/admin/update_edit.html
@@ -53,6 +53,9 @@
<li>[% loc('Cobrand:') %] [% update.cobrand %]</li>
<li>[% loc('Cobrand data:') %] [% update.cobrand_data %]</li>
<li>[% loc('Created:') %] [% PROCESS format_time time=update.created %]</li>
+[% IF update.get_extra_metadata('external_status_code') %]
+<li>[% loc('External status code:') %] [% update.get_extra_metadata('external_status_code') | html %]</li>
+[% END %]
[% IF update.photo %]
<li>
diff --git a/templates/web/base/admin/user_import.html b/templates/web/base/admin/user_import.html
new file mode 100644
index 000000000..f866ed955
--- /dev/null
+++ b/templates/web/base/admin/user_import.html
@@ -0,0 +1,76 @@
+[% INCLUDE 'admin/header.html' title=loc("User Import") -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+[% status_message %]
+
+<form method="post" id="user_edit" action="[% c.uri_for( 'user_import' ) %]" enctype="multipart/form-data" accept-charset="utf-8">
+ <input type="hidden" name="token" value="[% csrf_token %]" >
+ <input type="hidden" name="submit" value="1" >
+
+ <p>
+ <label>
+ [% loc('CSV File') %]
+ <input type="file" name="csvfile" id="form_csvfile" />
+ </label>
+ <input type="submit" class="btn" name="Import users" value="[% loc('Import users') %]" />
+ </p>
+</form>
+
+[% IF new_users %]
+ <h2>[% tprintf(loc('Created %d new users'), new_users.size ) %]</h2>
+ <table>
+ <tr>
+ <th>[% loc('Name') %]</th>
+ <th>[% loc('Email') %]</th>
+ <th>[% loc('Body') %]</th>
+ </tr>
+ [% FOREACH user IN new_users %]
+ <tr>
+ <td>
+ <a href="[% c.uri_for_action( 'admin/user_edit', user.id ) %]">
+ [% user.name %]
+ </a>
+ </td>
+ <td>[% user.email %]</td>
+ <td>[% user.from_body.name %]</td>
+ </tr>
+ [% END %]
+ </table>
+[% END %]
+
+[% IF existing_users %]
+ <h2>[% tprintf(loc("%d users already existed"), existing_users.size) %]</h2>
+ <p>[% loc("These users weren't updated.") %]</p>
+ <table>
+ <tr>
+ <th>[% loc('Name') %]</th>
+ <th>[% loc('Email') %]</th>
+ <th>[% loc('Body') %]</th>
+ </tr>
+ [% FOREACH user IN existing_users %]
+ <tr>
+ <td>
+ <a href="[% c.uri_for_action( 'admin/user_edit', user.id ) %]">
+ [% user.name %]
+ </a>
+ </td>
+ <td>[% user.email %]</td>
+ <td>[% user.from_body.name %]</td>
+ </tr>
+ [% END %]
+ </table>
+[% END %]
+
+<h2>[% loc('Usage notes') %]</h2>
+<p>[% loc('This page is a quick way to create many new staff users in one go.') %]</p>
+<p>[% loc("Existing users won't be modified.") %]</p>
+<p>
+ [% loc("The uploaded CSV file must contain a header row, and records must have the following fields (in this order):") %]
+ <pre>name,email,from_body,permissions</pre>
+ <ul>
+ <li><code>from_body</code>: [% loc("the database id of the body to associate that user with, e.g. <code>2217</code> for Buckinghamshire.") %]</li>
+ <li><code>permissions</code>: [% loc("a colon-separated list of permissions to grant that user, e.g. <code>contribute_as_body:moderate:user_edit</code>.") %]</li>
+ </ul>
+</p>
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/base/around/_error_multiple.html b/templates/web/base/around/_error_multiple.html
index 751d81173..6a43eac32 100644
--- a/templates/web/base/around/_error_multiple.html
+++ b/templates/web/base/around/_error_multiple.html
@@ -5,9 +5,14 @@
[% IF possible_location_matches %]
<p>[% loc('We found more than one match for that location.') %]</p>
<ul class="pc_alternatives">
- [% FOREACH match IN possible_location_matches %]
- <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %][% IF c.req.params.category %];category=[% c.req.params.category | uri %][% END %]">[% match.address | html %]</a></li>
- [% END %]
+ [% FOREACH match IN possible_location_matches %]
+ <li>
+ [% IF match.icon %]
+ <img src="[% match.icon %]" alt="">
+ [% END %]
+ <a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %][% IF c.req.params.category %];category=[% c.req.params.category | uri %][% END %]">[% match.address | html %]</a>
+ </li>
+ [% END %]
</ul>
<p>[% loc('We show up to ten matches, please try a different search if yours is not here.') %]</p>
[% END %]
diff --git a/templates/web/base/around/_postcode_form_post.html b/templates/web/base/around/_postcode_form_post.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/base/around/_postcode_form_post.html
diff --git a/templates/web/base/around/_updates.html b/templates/web/base/around/_updates.html
index 6121b218b..e5af69da0 100755
--- a/templates/web/base/around/_updates.html
+++ b/templates/web/base/around/_updates.html
@@ -1,5 +1,5 @@
<div class="shadow-wrap">
<ul id="key-tools">
- <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">[% loc("Get updates") %]</a></li>
+ <li><a class="feed js-feed" id="key-tool-around-updates" href="[% email_url | html %]">[% loc("Get updates") %]</a></li>
</ul>
</div>
diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html
index 029435cf2..826e70632 100755
--- a/templates/web/base/around/display_location.html
+++ b/templates/web/base/around/display_location.html
@@ -60,7 +60,7 @@
<a class="big-hide-pins-link" rel='nofollow' href="[% c.uri_with( { no_pins => 1 } ) %]">[% loc('Hide pins') %]</a>
[% END %]
- <p id='sub_map_links'>
+ <p class="sub-map-links" id='sub_map_links'>
[% map_sub_links %]
[% IF c.req.params.no_pins %]
<a id='hide_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => 0 } ) %]">[% loc('Show pins') %]</a>
diff --git a/templates/web/base/around/index.html b/templates/web/base/around/index.html
index 8f6af6225..df49bff8d 100644
--- a/templates/web/base/around/index.html
+++ b/templates/web/base/around/index.html
@@ -1,5 +1,5 @@
[% pre_container_extra = INCLUDE 'around/postcode_form.html' %]
-[% SET bodyclass = 'frontpage fullwidthpage' ~%]
+[% SET bodyclass = 'frontpage fullwidthpage aroundpage' ~%]
[% INCLUDE 'header.html', title = loc('Reporting a problem') %]
[%
diff --git a/templates/web/base/around/postcode_form.html b/templates/web/base/around/postcode_form.html
index efb639eda..52aa177a9 100644
--- a/templates/web/base/around/postcode_form.html
+++ b/templates/web/base/around/postcode_form.html
@@ -11,7 +11,7 @@
<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm" class="js-geolocate">
<label for="pc">[% question %]:</label>
<div>
- <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
+ <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]" required>
<input type="submit" value="[% loc('Go') %]" id="sub">
</div>
@@ -24,5 +24,9 @@
[% END %]
</form>
<a href="[% c.uri_for('/around') %]" id="geolocate_link">&hellip; [% loc('or locate me automatically') %]</a>
+
+ [% UNLESS possible_location_matches %]
+ [% INCLUDE 'around/_postcode_form_post.html' %]
+ [% END %]
</div>
</div>
diff --git a/templates/web/base/auth/2faform.html b/templates/web/base/auth/2faform.html
index bd8d60cdb..360883d49 100644
--- a/templates/web/base/auth/2faform.html
+++ b/templates/web/base/auth/2faform.html
@@ -17,7 +17,7 @@
<label for="2fa_code">[% loc('Code') %]</label>
<div class="form-txt-submit-box">
- <input class="form-control" type="number" id="2fa_code" name="2fa_code" value="" required>
+ <input autofocus class="form-control" type="number" id="2fa_code" name="2fa_code" value="" required>
<input type="submit" value="[% loc('Submit') %]" class="btn-primary">
</div>
</form>
diff --git a/templates/web/base/common_header_tags.html b/templates/web/base/common_header_tags.html
index 541bb1a56..69b155a9e 100644
--- a/templates/web/base/common_header_tags.html
+++ b/templates/web/base/common_header_tags.html
@@ -14,7 +14,7 @@
<script nonce="[% csp_nonce %]">
window.Modernizr=function(e,t,n){function r(e){p.cssText=e}function o(e,t){return typeof e===t}var a,i,c,l="2.8.3",s={},u=t.documentElement,d="modernizr",f=t.createElement(d),p=f.style,m=({}.toString,{}),h=[],y=h.slice,v=function(e,n,r,o){var a,i,c,l,s=t.createElement("div"),f=t.body,p=f||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:d+(r+1),s.appendChild(c);return a=["&#173;",'<style id="s',d,'">',e,"</style>"].join(""),s.id=d,(f?s:p).innerHTML+=a,p.appendChild(s),f||(p.style.background="",p.style.overflow="hidden",l=u.style.overflow,u.style.overflow="hidden",u.appendChild(p)),i=n(s,e),f?s.parentNode.removeChild(s):(p.parentNode.removeChild(p),u.style.overflow=l),!!i},g=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var r;return v("@media "+t+" { #"+d+" { position: absolute; } }",function(t){r="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),r},b={}.hasOwnProperty;c=o(b,"undefined")||o(b.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return b.call(e,t)};for(var E in m)c(m,E)&&(i=E.toLowerCase(),s[i]=m[E](),h.push((s[i]?"":"no-")+i));return r(""),f=a=null,s._version=l,s.mq=g,s.testStyles=v,s}(this,this.document);
var fixmystreet=fixmystreet||{};
- (function(b){var a=b.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var c=-1<a.className.indexOf("iel8");c=Modernizr.mq("(min-width: 48em)")||c?"desktop":"mobile";b=b.getElementById("js-meta-data");"IntersectionObserver"in window&&(a.className+=" lazyload");fixmystreet.page=b.getAttribute("data-page");fixmystreet.cobrand=b.getAttribute("data-cobrand");"mobile"==c&&(a.className+=" mobile","around"==fixmystreet.page&&(a.className+=" map-fullscreen only-map map-reporting"))})(document);
+ (function(b){var a=b.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var c=-1<a.className.indexOf("ie8");c=Modernizr.mq("(min-width: 48em)")||c?"desktop":"mobile";b=b.getElementById("js-meta-data");"IntersectionObserver"in window&&(a.className+=" lazyload");fixmystreet.page=b.getAttribute("data-page");fixmystreet.cobrand=b.getAttribute("data-cobrand");"mobile"==c&&(a.className+=" mobile","around"==fixmystreet.page&&(a.className+=" map-fullscreen only-map map-reporting"))})(document);
</script>
@@ -41,7 +41,7 @@
<link rel="prefetch" href="[% version('/cobrands/fixmystreet/fixmystreet.js') %]">
[% END %]
[% IF NOT bodyclass.match('mappage') %]
- [% FOR script IN map_js %]
+ [% FOR script IN map_js.merge(c.cobrand.call_hook('map_js_extra', c)) %]
<link rel="prefetch" href="[% IF script.match('^/'); version(script); ELSE; script; END %]">
[% END %]
<link rel="prefetch" href="[% version('/cobrands/fixmystreet/map.js') %]">
diff --git a/templates/web/base/common_scripts.html b/templates/web/base/common_scripts.html
index cf9692128..3d923f33f 100644
--- a/templates/web/base/common_scripts.html
+++ b/templates/web/base/common_scripts.html
@@ -46,7 +46,7 @@ IF c.user_exists AND (c.user.from_body OR c.user.is_superuser);
END;
IF bodyclass.match('mappage');
- FOR script IN map_js;
+ FOR script IN map_js.merge(c.cobrand.call_hook('map_js_extra', c));
IF script.match('^/');
scripts.push(version(script));
ELSE;
diff --git a/templates/web/base/contact/index.html b/templates/web/base/contact/index.html
index dfd3ef6b2..326c26ce8 100644
--- a/templates/web/base/contact/index.html
+++ b/templates/web/base/contact/index.html
@@ -103,17 +103,25 @@
[% END %]
<textarea class="form-control required" name="message" id="form_message" rows="7" cols="50">[% message | html %]</textarea>
+ [% IF NOT problem AND NOT update %]
+ <p>[% loc('If you are contacting us about a specific report or update please include a link to the report in the message.') %]</p>
+ [% END %]
+
<input class="final-submit green-btn" type="submit" value="[% loc('Send') %]">
</fieldset>
</form>
-<h4>[% loc("Don't like forms?") %]</h4>
+[% TRY %]
+ [% INCLUDE 'contact/_footer.html' %]
+[% CATCH file %]
+ <h4>[% loc("Don't like forms?") %]</h4>
-<p>
-[% tprintf( loc("You can contact technical support on <a href='mailto:%s'>%s</a>"), contact_email, contact_email) %]
-</p>
+ <p>
+ [% tprintf( loc("You can contact technical support on <a href='mailto:%s'>%s</a>"), contact_email, contact_email) %]
+ </p>
+[% END %]
[% TRY %][% INCLUDE 'contact/address.html' %][% CATCH file %][% END %]
diff --git a/templates/web/base/develop/email_list.html b/templates/web/base/develop/email_list.html
new file mode 100755
index 000000000..5b4298522
--- /dev/null
+++ b/templates/web/base/develop/email_list.html
@@ -0,0 +1,11 @@
+[% INCLUDE 'header.html' %]
+
+<h1>[% loc('Templates') %]</h1>
+
+<ul>
+[% FOR template IN templates %]
+<li><a href="[% template.url %]">[% template.name %]</a></li>
+[% END %]
+</ul>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/base/footer.html b/templates/web/base/footer.html
index e2bdbb01a..e2bdbb01a 100644..100755
--- a/templates/web/base/footer.html
+++ b/templates/web/base/footer.html
diff --git a/templates/web/base/front/footer-marketing.html b/templates/web/base/front/footer-marketing.html
index 3fb7a3044..6e7fc2a97 100644
--- a/templates/web/base/front/footer-marketing.html
+++ b/templates/web/base/front/footer-marketing.html
@@ -1,8 +1,8 @@
<div class="tablewrapper bordered footer-marketing">
<p>
- [% loc('Would you like to contribute to FixMyStreet? Our code is open source and <a href="http://fixmystreet.org">available at fixmystreet.org</a>.') %]
+ [% loc('Would you like to contribute to FixMyStreet? Our code is open source and <a href="https://fixmystreet.org">available at fixmystreet.org</a>.') %]
</p>
<p>
- [% loc('Powered by <a class="platform-logo" href="http://fixmystreet.org/">FixMyStreet Platform</a>') %]
+ [% loc('Powered by <a class="platform-logo" href="https://fixmystreet.org/">FixMyStreet Platform</a>') %]
</p>
</div>
diff --git a/templates/web/base/front/stats.html b/templates/web/base/front/stats.html
index 41358c869..8bef17d1f 100644
--- a/templates/web/base/front/stats.html
+++ b/templates/web/base/front/stats.html
@@ -34,11 +34,17 @@
%]
<div id="front_stats">
+ [% SWITCH c.cobrand.moniker %]
+ [% CASE 'fixamingata' %]
+ <div>[% tprintf( new_text, decode(new_n).replace(" ", "&nbsp;").replace(",", "&nbsp;") ) %]</div>
+ <div>[% tprintf( fixed_text, decode(fixed_n).replace(" ", "&nbsp;").replace(",", "&nbsp;") ) %]</div>
+ <div>[% tprintf( updates_text, decode(updates_n).replace(" ", "&nbsp;").replace(",", "&nbsp;") ) %]</div>
+ [% CASE 'zurich' %]
+ <div>[% tprintf( new_text, decode(new_n) ) %]</div>
+ <div>[% tprintf( fixed_text, decode(fixed_n) ) %]</div>
+ [% CASE %]
<div>[% tprintf( new_text, decode(new_n) ) %]</div>
- [% IF has_fixed_state %]
<div>[% tprintf( fixed_text, decode(fixed_n) ) %]</div>
- [% END %]
- [% IF c.cobrand.moniker != 'zurich' %]
<div>[% tprintf( updates_text, decode(updates_n) ) %]</div>
[% END %]
</div>
diff --git a/templates/web/base/header.html b/templates/web/base/header.html
index 3cc166a32..7f423ff9e 100644
--- a/templates/web/base/header.html
+++ b/templates/web/base/header.html
@@ -4,8 +4,7 @@
# SET html_att = html_att _ ' dir="rtl"';
-%]
<!doctype html>
-<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]-->
-<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]-->
+<!--[if IE 8]> <html class="no-js ie8"[% html_att %]><![endif]-->
<!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]-->
<!--[if gt IE 9]><!--><html class="no-js"[% html_att %]
[% IF appcache ~%]
diff --git a/templates/web/base/header_opengraph.html b/templates/web/base/header_opengraph.html
index 6b2c8ff46..8cda4c717 100644
--- a/templates/web/base/header_opengraph.html
+++ b/templates/web/base/header_opengraph.html
@@ -1,6 +1,6 @@
<meta property="og:url" content="[% c.cobrand.base_url %][% c.req.uri.path %]">
<meta property="og:title" content="[% title || site_name | html %]">
<meta property="og:site_name" content="[% site_name %]">
- [% IF c.req.uri.path == '/' %]<meta property="og:description" content="Report, view, and discuss local street-related problems.">[% END %]
+ [% IF c.req.uri.path == '/' %]<meta property="og:description" content="[% loc('Report, view, and discuss local street-related problems.') %]">[% END %]
<meta property="og:type" content="website">
[% INCLUDE 'header_opengraph_image.html' %]
diff --git a/templates/web/base/main_nav.html b/templates/web/base/main_nav.html
index 9736697e3..189630902 100644
--- a/templates/web/base/main_nav.html
+++ b/templates/web/base/main_nav.html
@@ -1,7 +1,4 @@
[%
- SET base = "";
- SET base = c.cobrand.base_url IF admin;
-
# DEFAULT would make sense here, except it treats the empty string as falsy
# and some cobrands want to set ul_class to an empty string.
SET ul_class="nav-menu nav-menu--main" UNLESS ul_class.defined;
@@ -11,7 +8,7 @@
[%~ IF c.req.uri.path == uri AND NOT always_url ~%]
<span [% attrs %]>[% label %]</span>
[%~ ELSE ~%]
- <a href="[% base %][% uri %][% suffix IF suffix %]" [% attrs %]>[% label %]</a>
+ <a href="[% uri %][% suffix IF suffix %]" [% attrs %]>[% label %]</a>
[%~ END ~%]
</li>
[%~ END %]
diff --git a/templates/web/base/maps/google-ol.html b/templates/web/base/maps/google-ol.html
index 3cd21fab3..8e0690f9d 100644
--- a/templates/web/base/maps/google-ol.html
+++ b/templates/web/base/maps/google-ol.html
@@ -5,7 +5,7 @@
[% map_html = BLOCK %]
[% INCLUDE maps/openlayers.html %]
[% UNLESS around_page %]
-<p id="sub_map_links">
+<p class="sub-map-links" id="sub_map_links">
[% map_sub_links %]
</p>
[% END %]
diff --git a/templates/web/base/maps/osm.html b/templates/web/base/maps/osm.html
index 51c3ad388..70d05929f 100644
--- a/templates/web/base/maps/osm.html
+++ b/templates/web/base/maps/osm.html
@@ -1,3 +1,4 @@
[%
+map.copyright = ''; # This is handled with OpenLayers.Control.Attribution
map_html = INCLUDE maps/openlayers.html
%]
diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html
index 12ca36cf2..4305f05c9 100644
--- a/templates/web/base/questionnaire/index.html
+++ b/templates/web/base/questionnaire/index.html
@@ -13,22 +13,6 @@
<h1>[% loc('Questionnaire') %]</h1>
-<h2 class="questionnaire-report-header">[% loc('Your report') %]</h2>
-<div class="questionnaire-report-reminder">
- [% INCLUDE 'report/photo.html' object=problem %]
- <h3 class="questionnaire-report-reminder__report-title">
- <a href="/report/[% problem.id %]">[% problem.title | html %]</a>
- </h3>
- <p class="questionnaire-report-reminder__report-meta">[% problem.meta_line(c) | html %]</p>
- [% IF updates.size %]
- <p class="questionnaire-report-reminder__last-update-header">
- <strong>[% loc('Last update') %]</strong>
- <a href="/report/[% problem.id %]">[% loc('Show all updates') %]</a>
- </p>
- <p class="questionnaire-report-reminder__last-update">&ldquo;[% updates.last.text | add_links %]&rdquo;</p>
- [% END %]
-</div>
-
<form method="post" action="/questionnaire/submit" id="questionnaire"
[%- IF c.cobrand.allow_photo_upload -%]
enctype="multipart/form-data"
@@ -43,8 +27,8 @@
</ul>
[% END %]
-<p>
-[% loc('An update marked this problem as fixed.') IF problem.is_fixed %]
+<p>1.
+[% loc('An update marked this problem as fixed.') IF was_fixed %]
[% loc('Has this problem been fixed?') %]
</p>
@@ -57,8 +41,24 @@
<label class="btn" for="been_fixed_unknown">[% loc('Don&rsquo;t know') %]</label>
</p>
+<h2 class="questionnaire-report-header">[% loc('Your report') %]</h2>
+<div class="questionnaire-report-reminder">
+ [% INCLUDE 'report/photo.html' object=problem %]
+ <h3 class="questionnaire-report-reminder__report-title">
+ <a href="/report/[% problem.id %]">[% problem.title | html %]</a>
+ </h3>
+ <p class="questionnaire-report-reminder__report-meta">[% problem.meta_line(c) | html %]</p>
+ [% IF updates.size %]
+ <p class="questionnaire-report-reminder__last-update-header">
+ <strong>[% loc('Last update') %]</strong>
+ <a href="/report/[% problem.id %]">[% loc('Show all updates') %]</a>
+ </p>
+ <p class="questionnaire-report-reminder__last-update">&ldquo;[% updates.last.text | add_links %]&rdquo;</p>
+ [% END %]
+</div>
+
[% UNLESS answered_ever_reported %]
-<p>[% loc('Have you ever reported a problem to a council before, or is this your first time?') %]</p>
+<p>2. [% loc('Have you ever reported a problem to a council before, or is this your first time?') %]</p>
<p class="segmented-control segmented-control--radio">
<input type="radio" name="reported" id="reported_yes" value="Yes"[% ' checked' IF reported == 'Yes' %]>
<label class="btn" for="reported_yes">[% loc('Reported before') %]</label>
@@ -67,7 +67,7 @@
</p>
[% END %]
-<p>[% loc('If you wish to leave a public update on the problem, please enter it here
+<p>3. [% loc('If you wish to leave a public update on the problem, please enter it here
(please note it will not be sent to the council).') %]</p>
<p><textarea class="form-control" name="update" rows="7" cols="30" placeholder="[% loc('What was your experience of getting the problem fixed?') %]">[% update | html %]</textarea></p>
@@ -98,7 +98,7 @@
[% END %]
<div class="js-another-questionnaire">
- <p>[% loc('Would you like to receive another questionnaire in 4 weeks, reminding you to check the status?') %]</p>
+ <p>4. [% loc('Would you like to receive another questionnaire in 4 weeks, reminding you to check the status?') %]</p>
<p class="segmented-control segmented-control--radio">
<input type="radio" name="another" id="another_yes" value="Yes"[% ' checked' IF another == 'Yes' %]>
<label class="btn" for="another_yes">[% loc('Yes') %]</label>
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html
index 1893826de..222780dcb 100644
--- a/templates/web/base/report/_inspect.html
+++ b/templates/web/base/report/_inspect.html
@@ -7,12 +7,18 @@
[% INCLUDE 'errors.html' %]
<form name="report_inspect_form" id="report_inspect_form" method="post" action="[% c.uri_for( '/report', problem.id ) %]" class="validate">
- <input type="hidden" name="js" value="">
<div class="inspect-section">
+ <p style="float: right">
+ <label for="non_public">[% loc('Private') %]</label>
+ <input type="checkbox" id="non_public" name="non_public" value="1"[% ' checked' IF problem.non_public %]>
+ </p>
<p>
<strong>[% loc('Report ID:') %]</strong>
<span class="js-report-id">[% problem.id %]</span>
+ [% IF c.user_exists AND c.cobrand.admin_allow_user(c.user) AND c.user.has_permission_to('report_edit', problem.bodies_str_ids) %]
+ (<a href="[% c.uri_for_action( "admin/report_edit", problem.id ) %]">[% loc('admin') %]</a>)
+ [% END %]
</p>
[% IF permissions.report_inspect AND problem.user.phone %]
<p>
@@ -46,6 +52,11 @@
<p>
<a href="#" class="btn btn--block btn--geolocate">[% loc('Set to my current location') %]</a>
</p>
+ [% IF permissions.report_reject %]
+ <p>
+ <a href="[% c.uri_for( '/contact', { id => problem.id, reject => 1 } ) %]" class="btn btn--block">[% loc('Reject report') %]</a>
+ </p>
+ [% END %]
</div>
[% IF permissions.report_edit_category OR permissions.report_inspect %]
@@ -55,19 +66,19 @@
[% INCLUDE 'admin/report-category.html' %]
</p>
- [% FOREACH category IN category_options_copy %]
- [% cat_name = category.name;
+ [% FOREACH category IN category_options %]
+ [% cat_name = category.category;
cat_prefix = cat_name | lower | replace('[^a-z]', '');
cat_prefix = "category_" _ cat_prefix _ "_" %]
<p data-category="[% cat_name | html %]"
[%~ IF cat_name != problem.category %] class="hidden"[% END %]
- data-priorities='[% priorities_by_category.$cat_name %]'
- data-defect-types='[% category_defect_types.$cat_name %]'
- data-templates='[% templates_by_category.$cat_name %]'>
+ data-priorities='[% priorities_by_category.$cat_name | html %]'
+ data-defect-types='[% category_defect_types.$cat_name | html %]'
+ data-templates='[% templates_by_category.$cat_name | html %]'>
[% IF cat_name == problem.category %]
- [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$cat_name hide_notices=1 %]
+ [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$cat_name hide_notices=1 show_hidden=1 %]
[% ELSE %]
- [% INCLUDE 'report/new/category_extras_fields.html' report_meta='' metas=category_extras.$cat_name hide_notices=1 %]
+ [% INCLUDE 'report/new/category_extras_fields.html' report_meta='' metas=category_extras.$cat_name hide_notices=1 show_hidden=1 %]
[% END %]
</p>
[% END %]
@@ -190,6 +201,7 @@
</p>
</div>
+ <input type="hidden" name="js" value="">
</form>
</div>
[%- END %]
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index 8179139ca..b1fa8fcad 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -66,7 +66,8 @@
[% IF include_sentinfo %]
[% IF c.cobrand.is_council && !c.cobrand.owns_problem( problem ) %]
(sent to [% problem.body %])
- [% ELSIF problem.bodies_str_ids.size > 1 %] [% loc('(sent to both)') %]
+ [% ELSIF problem.bodies_str_ids.size > 2 %] [% loc('(sent to all)') %]
+ [% ELSIF problem.bodies_str_ids.size == 2 %] [% loc('(sent to both)') %]
[% ELSIF problem.bodies_str_ids.size == 0 %] [% loc('(not sent to council)') %]
[% END %]
[% END %]
diff --git a/templates/web/base/report/_show_name_label.html b/templates/web/base/report/_show_name_label.html
new file mode 100644
index 000000000..1e62b5fc0
--- /dev/null
+++ b/templates/web/base/report/_show_name_label.html
@@ -0,0 +1,5 @@
+[%# if there is nothing in the name field then set check box as default on form %]
+<div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
+</div>
diff --git a/templates/web/base/report/_update_state.html b/templates/web/base/report/_update_state.html
new file mode 100644
index 000000000..0274d7695
--- /dev/null
+++ b/templates/web/base/report/_update_state.html
@@ -0,0 +1,24 @@
+[% # Small chance of duplicates in the case of fixed - user followed by fixed - council %]
+[% SET update_state = update.problem_state %]
+[% IF ( update_state AND update_state != global.last_state AND NOT (global.last_state == "" AND update.problem_state == 'confirmed') )
+ OR update.mark_fixed
+ OR update.mark_open
+%]
+ <p class="meta-2">[% loc('State changed to:') %] [% update.problem_state_display(c) %]</p>
+ [%- global.last_state = update_state %]
+ [%- IF update_state == "" AND update.mark_fixed %][% global.last_state = 'fixed - user' %][% END %]
+ [%- IF update_state == "" AND update.mark_open %][% global.last_state = 'confirmed' %][% END %]
+[% END %]
+
+<p class="meta-2">
+ [% INCLUDE meta_line %]
+ [% IF c.user_exists AND c.user.id == update.user_id AND !update.anonymous %]
+ <small>(<a href="/my/anonymize?update=[% update.id | uri %]" class="js-hide-name">[% loc('Hide your name?') %]</a>)</small>
+ [% END %]
+ [% mlog = update.latest_moderation_log_entry(); IF mlog %]
+ <br />[% tprintf(loc('Moderated by %s at %s'), mlog.admin_user, prettify_dt(mlog.whenedited)) %]
+ [% END %]
+ [% IF update.get_extra_metadata('open_from_questionnaire') %]
+ <br />[% loc('Still open, via questionnaire') %]
+ [% END %]
+</p>
diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html
index f9c42b35d..8c461dced 100644
--- a/templates/web/base/report/display.html
+++ b/templates/web/base/report/display.html
@@ -53,7 +53,7 @@
[% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %]
[% INCLUDE 'report/updates.html' %]
-[% IF two_column_sidebar %]
+[% IF two_column_sidebar AND NOT problem.extra.closed_updates %]
<button class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button>
<div class="hidden-js">
[% END %]
@@ -62,7 +62,7 @@
[% ELSIF NOT shown_form %]
[% INCLUDE 'report/update-form.html' %]
[% END %]
-[% IF two_column_sidebar %]
+[% IF two_column_sidebar AND NOT problem.extra.closed_updates %]
</div>
[% END %]
diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html
index bb76cc388..e0d8e3f99 100644
--- a/templates/web/base/report/display_tools.html
+++ b/templates/web/base/report/display_tools.html
@@ -10,8 +10,8 @@
c.cobrand.moniker == 'fixmystreet' ? 'Unsuitable?' : loc('Report abuse')
%]</a></li>
[% END %]
- [% IF c.cobrand.moniker != 'zurich' %]
- <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
+ [% IF NOT problem.extra.closed_updates AND c.cobrand.moniker != 'zurich' %]
+ <li><a rel="nofollow" id="key-tool-report-updates" class="feed js-feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
[% END %]
[% IF c.cobrand.moniker == 'fixmystreet' %]
<li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li>
diff --git a/templates/web/base/report/nearby.html b/templates/web/base/report/nearby.html
new file mode 100644
index 000000000..c64b10d7f
--- /dev/null
+++ b/templates/web/base/report/nearby.html
@@ -0,0 +1,3 @@
+[%~ FOREACH problem IN reports ~%]
+ [%~ INCLUDE 'reports/_list-entry.html' ~%]
+[%~ END ~%]
diff --git a/templates/web/base/report/new/category.html b/templates/web/base/report/new/category.html
index 94d5479a6..83af42c6d 100644
--- a/templates/web/base/report/new/category.html
+++ b/templates/web/base/report/new/category.html
@@ -1,8 +1,10 @@
[% IF category_options.size OR category_groups.size ~%]
[%~ BLOCK category_option ~%]
- [% cat_op_lc = cat_op.name | lower =%]
- <option value='[% cat_op.name | html %]'[% ' selected' IF report.category == cat_op.name || category_lc == cat_op_lc || (category_options.size == 2 AND loop.last) ~%]
- >[% IF loop.first %][% cat_op.value %][% ELSE %][% cat_op.value | html %][% END %]</option>
+ [% cat_op_lc = cat_op.category | lower =%]
+ <option value='[% cat_op.category | html %]'[% ' selected' IF report.category == cat_op.category || category_lc == cat_op_lc || (category_options.size == 2 AND loop.last) ~%]
+ >[% IF loop.first %][% cat_op.category_display %][% ELSE %][% cat_op.category_display | html %][% END %]
+ [%~ IF cat_op.get_extra_metadata('help_text') %] ([% cat_op.get_extra_metadata('help_text') %])[% END ~%]
+ </option>
[%~ END ~%]
[% IF category;
diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html
index fd2752388..f787b9c52 100644
--- a/templates/web/base/report/new/category_extras.html
+++ b/templates/web/base/report/new/category_extras.html
@@ -1,4 +1,5 @@
-[% DEFAULT list_of_names = bodies_to_list_names %]
+[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.name) %][% END %]
+[% DEFAULT list_of_names = default_list %]
<div id="category_meta">
[%- IF unresponsive.$category %]
@@ -7,16 +8,20 @@
[%- END %]
[%- IF category_extras.$category.size %]
- <div class="extra-category-questions full-width">
- <h2 class="form-section-heading">[% category %]</h2>
- <p class="form-section-description">
- [% tprintf(
- loc('Help <strong>%s</strong> resolve your problem quicker, by providing some extra detail. This extra information will not be published online.'),
- list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
- ); %]
- </p>
- [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
- </div>
+ [% UNLESS category_extras_hidden.$category %]
+ <div class="extra-category-questions full-width">
+ <h2 class="form-section-heading">[% category %]</h2>
+ <p class="form-section-description">
+ [% tprintf(
+ loc('Help <strong>%s</strong> resolve your problem quicker, by providing some extra detail. This extra information will not be published online.'),
+ list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ ); %]
+ </p>
+ [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
+ </div>
+ [% ELSE %]
+ [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
+ [% END %]
[%- END %]
[%- IF report_extra_fields %]
diff --git a/templates/web/base/report/new/category_extras_fields.html b/templates/web/base/report/new/category_extras_fields.html
index 5cbdcc524..c4456d04e 100644
--- a/templates/web/base/report/new/category_extras_fields.html
+++ b/templates/web/base/report/new/category_extras_fields.html
@@ -1,19 +1,21 @@
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
- [% IF c.cobrand.category_extra_hidden(meta_name) %]
+ [% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
- <input type="hidden" value="" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
+ <input type="hidden" value="[% report_meta.$meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% meta.description %]</label>
+ [% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$meta_name %]
<p class='form-error'>[% field_errors.$meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.exists('values') %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
+ <option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
diff --git a/templates/web/base/report/new/councils_text_all.html b/templates/web/base/report/new/councils_text_all.html
index 9a11eaae6..3ea641cbf 100644
--- a/templates/web/base/report/new/councils_text_all.html
+++ b/templates/web/base/report/new/councils_text_all.html
@@ -1,4 +1,5 @@
-[% DEFAULT list_of_names = bodies_to_list_names %]
+[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.name) %][% END %]
+[% DEFAULT list_of_names = default_list %]
<p>
[%
diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html
index f8714f573..a508b9307 100644
--- a/templates/web/base/report/new/fill_in_details_form.html
+++ b/templates/web/base/report/new/fill_in_details_form.html
@@ -4,6 +4,8 @@
<p class="change_location">[% loc('Wrong location? Just click again on the map.') %]</p>
[% END %]
+[% TRY %][% INCLUDE 'report/new/roads_message.html' %][% CATCH file %][% END %]
+
<div id="js-top-message">
[% PROCESS 'report/new/top_message.html' %]
</div>
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html
index 1d1a0e289..d6efac423 100644
--- a/templates/web/base/report/new/form_report.html
+++ b/templates/web/base/report/new/form_report.html
@@ -6,6 +6,7 @@
[% PROCESS "report/new/category_wrapper.html" %]
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
+[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]
<h2 class="form-section-heading">[% loc( 'Public details' ) %]</h2>
<div class="form-section-description" id="js-councils_text">
@@ -16,11 +17,7 @@
[% END %]
</div>
- <label for="form_title">[% loc('Summarise the problem') %]</label>
-[% IF field_errors.title %]
- <p class='form-error'>[% field_errors.title %]</p>
-[% END %]
- <input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% loc('10 inch pothole on Example St, near post box') %]" required>
+ [% INCLUDE 'report/new/form_title.html' %]
[% TRY %][% PROCESS 'report/new/after_title.html' %][% CATCH file %][% END %]
@@ -51,11 +48,13 @@
[% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %]
- <label for="form_detail">[% loc('Explain what’s wrong') %]</label>
+ [% DEFAULT form_detail_label = loc('Explain what’s wrong') %]
+ <label for="form_detail">[% form_detail_label %]</label>
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
- <textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('This pothole has been here for two months and…') %]" required>[% report.detail | html %]</textarea>
+ [% DEFAULT form_detail_placeholder = loc('This pothole has been here for two months and…') %]
+ <textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" placeholder="[% form_detail_placeholder %]" required>[% report.detail | html %]</textarea>
[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %]
@@ -63,4 +62,5 @@
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
+ <input type="hidden" id="single_body_only" name="single_body_only" value="">
<input type="hidden" name="submit_problem" value="1">
diff --git a/templates/web/base/report/new/form_title.html b/templates/web/base/report/new/form_title.html
new file mode 100644
index 000000000..88996fd3f
--- /dev/null
+++ b/templates/web/base/report/new/form_title.html
@@ -0,0 +1,7 @@
+[% DEFAULT form_title = loc('Summarise the problem') %]
+<label for="form_title">[% form_title %]</label>
+[% IF field_errors.title %]
+ <p class='form-error'>[% field_errors.title %]</p>
+[% END %]
+[% DEFAULT form_title_placeholder = loc('10 inch pothole on Example St, near post box') %]
+<input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% form_title_placeholder %]" required>
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html
index ad74a5654..7f81764be 100644
--- a/templates/web/base/report/new/form_user_loggedin.html
+++ b/templates/web/base/report/new/form_user_loggedin.html
@@ -29,7 +29,7 @@
</select>
[% END %]
-[% IF c.user.phone_verified %]
+[% IF c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<label for="form_phone">[% loc('Phone number') %]</label>
<input class="form-control" id="form_phone" name="phone" disabled type="text" value="[% c.user.phone_display | html %]">
[% END %]
@@ -45,25 +45,10 @@
[% INCLUDE 'report/new/extra_name.html' %]
[% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
+ [% INCLUDE 'report/new/form_user_name.html' %]
+ [% INCLUDE 'report/_show_name_label.html' %]
- <label for="form_name">[% loc('Name') %]
- [% TRY %]
- [% INCLUDE 'report/new/after_name.html' %]
- [% CATCH file %]
- [% END %]
- </label>
- [% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
- [% END %]
- <input type="text" class="form-control validName js-form-name" value="[% report.name | html %]" name="name" id="form_name">
-
- [%# if there is nothing in the name field then set check box as default on form %]
- <div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %] </label>
- </div>
-
-[% IF NOT c.user.phone_verified %]
+[% IF NOT c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<label for="form_phone">[% loc('Phone number (optional)') %]</label>
<input class="form-control" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
[% END %]
@@ -72,6 +57,13 @@
<input class="form-control" type="text" value="[% report.user.email | html %]" name="email" id="form_email">
[% END %]
+[% IF c.user.has_permission_to("report_inspect", bodies.keys) %]
+ <div class="checkbox-group">
+ <input type="checkbox" name="non_public" id="form_non_public" value="1"[% ' checked' IF report.non_public %]>
+ <label class="inline" for="form_non_public">[% loc('Private') %] </label>
+ </div>
+[% END %]
+
<div class="form-txt-submit-box">
<input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
diff --git a/templates/web/base/report/new/form_user_loggedout_by_email.html b/templates/web/base/report/new/form_user_loggedout_by_email.html
index 975dbe704..b633c4843 100644
--- a/templates/web/base/report/new/form_user_loggedout_by_email.html
+++ b/templates/web/base/report/new/form_user_loggedout_by_email.html
@@ -7,29 +7,15 @@
[% INCLUDE 'report/new/extra_name.html' %]
[% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
-
- <label for="form_name">[% loc('Name') %]
- [% TRY %]
- [% INCLUDE 'report/new/after_name.html' %]
- [% CATCH file %]
- [% END %]
- </label>
- [% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
+ [% INCLUDE 'report/new/form_user_name.html' extra_class='form-focus-trigger' %]
+ [% INCLUDE 'report/_show_name_label.html' %]
+
+ [% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
+ <div id="js-hide-if-username-phone">
+ <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="form-control form-focus-hidden" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
+ </div>
[% END %]
-
- <input type="text" class="form-control form-focus-trigger validName js-form-name" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
-
- [%# if there is nothing in the name field then set check box as default on form %]
- <div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- </div>
-
- <div id="js-hide-if-username-phone">
- <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
- <input class="form-control form-focus-hidden" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
- </div>
<div id="js-hide-if-username-email">
<label class="form-focus-hidden" for="form_email">[% loc('Email address (optional)') %]</label>
<input class="form-control form-focus-hidden" type="text" value="[% report.user.email | html %]" name="email" id="form_email">
diff --git a/templates/web/base/report/new/form_user_name.html b/templates/web/base/report/new/form_user_name.html
new file mode 100644
index 000000000..1f745eadb
--- /dev/null
+++ b/templates/web/base/report/new/form_user_name.html
@@ -0,0 +1,10 @@
+<label for="form_name">[% loc('Name') %]
+[% TRY %]
+ [% INCLUDE 'report/new/after_name.html' %]
+ [% CATCH file %]
+[% END %]
+</label>
+[% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+[% END %]
+<input type="text" class="form-control validName js-form-name [% extra_class %]" value="[% report.name | html %]" name="name" id="form_name">
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 912aae2b4..9276acde9 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -1,9 +1,13 @@
[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
-[% RETURN IF NOT allow_creation %]
+[% RETURN IF NOT allow_creation OR problem.extra.closed_updates %]
<div id="update_form">
[% IF NOT login_success AND NOT oauth_need_email %]
- <h2[% IF two_column_sidebar %] class="hidden-js"[% END %]>[% loc( 'Provide an update') %]</h2>
+ [% TRY %]
+ [% INCLUDE 'report/_update-form-heading.html' %]
+ [% CATCH file %]
+ <h2[% IF two_column_sidebar %] class="hidden-js"[% END %]>[% loc( 'Provide an update') %]</h2>
+ [% END %]
[% IF c.cobrand.moniker != 'stevenage' %]
<div class="general-notes">
diff --git a/templates/web/base/report/update.html b/templates/web/base/report/update.html
index 100deb1ea..de8699802 100644
--- a/templates/web/base/report/update.html
+++ b/templates/web/base/report/update.html
@@ -4,6 +4,7 @@
<ul class="item-list item-list--updates">
[% END %]
<li class="item-list__item item-list__item--updates">
+ <a name="update_[% update.id %]" class="internal-link-fixed-header"></a>
[% IF permissions.moderate; original_update = update.moderation_original_data %]
<form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]">
<input type="hidden" name="token" value="[% csrf_token %]">
@@ -25,7 +26,6 @@
<p class="meta-2">[% INCLUDE meta_line %]</p>
</div>
[% ELSE %]
- <a name="update_[% update.id %]" class="internal-link-fixed-header"></a>
[% INCLUDE 'report/photo.html' object=update %]
<div class="item-list__update-text">
<div class="moderate-display">
@@ -41,26 +41,7 @@
</div>
[% END %]
- [% # Small chance of duplicates in the case of fixed - user followed by fixed - council %]
- [% SET update_state = update.problem_state %]
- [% IF ( update_state AND update_state != global.last_state AND NOT (global.last_state == "" AND update.problem_state == 'confirmed') ) OR
- update.mark_fixed OR update.mark_open
- %]
- <p class="meta-2">[% loc('State changed to:') %] [% update.problem_state_display(c) %]</p>
- [%- global.last_state = update_state %]
- [%- IF update_state == "" AND update.mark_fixed %][% global.last_state = 'fixed - user' %][% END %]
- [%- IF update_state == "" AND update.mark_open %][% global.last_state = 'confirmed' %][% END %]
- [% END %]
-
- <p class="meta-2">
- [% INCLUDE meta_line %]
- [% IF c.user_exists AND c.user.id == update.user_id AND !update.anonymous %]
- <small>(<a href="/my/anonymize?update=[% update.id | uri %]" class="js-hide-name">[% loc('Hide your name?') %]</a>)</small>
- [% END %]
- [% mlog = update.latest_moderation_log_entry(); IF mlog %]
- <br />[% tprintf(loc('Moderated by %s at %s'), mlog.admin_user, prettify_dt(mlog.whenedited)) %]
- [% END %]
- </p>
+ [% INCLUDE 'report/_update_state.html' %]
</div>
[% END %]
</div>
diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html
index f366895a5..218ce4149 100644
--- a/templates/web/base/report/update/form_name.html
+++ b/templates/web/base/report/update/form_name.html
@@ -32,10 +32,7 @@
<input type="text" class="form-control validNameU js-form-name"
name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
-<div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
-</div>
+[% INCLUDE 'report/_show_name_label.html' %]
<div class="checkbox-group">
<input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
diff --git a/templates/web/base/report/update/form_state_checkbox.html b/templates/web/base/report/update/form_state_checkbox.html
new file mode 100644
index 000000000..5316affb9
--- /dev/null
+++ b/templates/web/base/report/update/form_state_checkbox.html
@@ -0,0 +1,17 @@
+[% IF (problem.is_fixed OR problem.is_closed) AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
+
+ <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF (update.mark_open || c.req.params.reopen) %]>
+ [% IF problem.is_closed %]
+ <label class="inline" for="form_reopen">[% loc('This problem is still ongoing') %]</label>
+ [% ELSE %]
+ <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
+ [% END %]
+
+[% ELSIF !problem.is_fixed AND has_fixed_state %]
+
+ <div class="checkbox-group">
+ <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
+ <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
+ </div>
+
+[% END %]
diff --git a/templates/web/base/report/update/form_update.html b/templates/web/base/report/update/form_update.html
index 5a1b3b602..06104c9e9 100644
--- a/templates/web/base/report/update/form_update.html
+++ b/templates/web/base/report/update/form_update.html
@@ -39,21 +39,5 @@
<label for="state">[% loc( 'State' ) %]</label>
[% INCLUDE 'report/inspect/state_groups_select.html' %]
[% ELSE %]
- [% IF (problem.is_fixed OR problem.is_closed) AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
-
- <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF (update.mark_open || c.req.params.reopen) %]>
- [% IF problem.is_closed %]
- <label class="inline" for="form_reopen">[% loc('This problem is still ongoing') %]</label>
- [% ELSE %]
- <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
- [% END %]
-
- [% ELSIF !problem.is_fixed AND has_fixed_state %]
-
- <div class="checkbox-group">
- <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
- <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
- </div>
-
- [% END %]
+ [% INCLUDE report/update/form_state_checkbox.html %]
[% END %]
diff --git a/templates/web/base/report/updates.html b/templates/web/base/report/updates.html
index e8a2d4bd3..1d37c1d99 100644
--- a/templates/web/base/report/updates.html
+++ b/templates/web/base/report/updates.html
@@ -13,7 +13,7 @@
[% IF update.whenanswered %]
[%# A questionnaire update, currently saying report is still open %]
- [% tprintf( loc( 'Still open, via questionnaire, %s' ), prettify_dt( update.whenanswered ) ) %]
+ [% loc('Still open, via questionnaire') %], [% prettify_dt( update.whenanswered ) %]
[% RETURN %]
[% END %]
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index ab8ac06f7..928d54452 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -1,7 +1,8 @@
+[% SET show_all_states = c.cobrand.filter_show_all_states OR (c.user_exists AND (c.user.is_superuser OR c.user.belongs_to_body(body.id))) %]
[% select_status = BLOCK %]
<select class="form-control js-multiple" name="status" id="statuses" multiple
data-all="[% loc('All') %]"
- [% IF c.user_exists AND c.user.is_superuser OR c.user.belongs_to_body(body.id) %]
+ [% IF show_all_states %]
[% options = []; FOR group IN filter_states; FOR state IN group.1; NEXT IF state == 'hidden'; options.push(state); END; END %]
data-all-options='["[% options.join('", "') %]"]'
[%~ ELSE ~%]
@@ -17,7 +18,7 @@
<option value="shortlisted"[% ' selected' IF filter_status.shortlisted %]>[% loc('Shortlisted') %]</option>
<option value="unshortlisted"[% ' selected' IF filter_status.unshortlisted %]>[% loc('Unshortlisted') %]</option>
[% END %]
- [% IF c.user_exists AND c.user.is_superuser OR c.user.belongs_to_body(body.id) %]
+ [% IF show_all_states %]
[% FOR group IN filter_states %]
[% FOR state IN group.1 %]
[% NEXT IF state == 'hidden' %]
@@ -38,8 +39,9 @@
[% IF filter_categories.size %]
<select class="form-control js-multiple" name="filter_category" id="filter_categories" multiple data-all="[% loc('Everything') %]">
[% FOR cat IN filter_categories %]
- <option value="[% cat.name | html %]"[% ' selected' IF filter_category.${cat.name} %]>
- [% cat.value | html %]
+ <option value="[% cat.category | html %]"[% ' selected' IF filter_category.${cat.category} %]>
+ [% cat.category_display | html %]
+ [%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</option>
[% END %]
</select>
diff --git a/templates/web/base/reports/_ward-list.html b/templates/web/base/reports/_ward-list.html
index 8160668d7..bc289a33c 100755
--- a/templates/web/base/reports/_ward-list.html
+++ b/templates/web/base/reports/_ward-list.html
@@ -1,16 +1,29 @@
[% IF children.size %]
-<section id="council_wards" class="hidden-js">
+[% SET show_wards_hidden_class = c.req.params.show_wards ? 'hidden' : 'js-ward-single' %]
+[% SET show_wards_shown_class = c.req.params.show_wards ? '' : 'js-ward-multi hidden' %]
+<section id="council_wards"[% UNLESS c.req.params.show_wards %] class="hidden-js"[% END %]>
<h2>[% ward_text %]</h2>
- <p>[% loc('Follow a ward link to view only reports within that ward.') %]</p>
+ <p class="[% show_wards_hidden_class %]">[% loc('Follow a ward link to view only reports within that ward.') %]</p>
+ <p class="[% show_wards_shown_class %]">[% loc('Select multiple wards to view only reports within those wards.') %]</p>
+ <p class="[% show_wards_hidden_class %]"><a href="?show_wards=1" class="js-ward-select-multiple">[% loc('Select multiple wards?') %]</a></p>
+ <form method="get" action="">
<section class="full-width">
<ul class="item-list item-list--wards">
[% FOR child IN children.values.sort('name') %]
<li class="item-list__item item-list--wards__item">
- <a href="[% child.url %]">[% child.name %]</a>
+ <label class="[% show_wards_shown_class %]">
+ <input type="checkbox" name="ward" value="[% child.name | html %]">
+ [% child.name %]
+ </label>
+ <a class="[% show_wards_hidden_class %]" href="[% child.url %]">[% child.name %]</a>
</li>
[% END %]
</ul>
</section>
+ <p>
+ <input class="btn [% show_wards_shown_class %]" type="submit" value="[% loc('View wards') %]" />
+ </p>
+ </form>
</section>
[% END %]
diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html
index 7931ae691..a630c2175 100755
--- a/templates/web/base/reports/body.html
+++ b/templates/web/base/reports/body.html
@@ -28,7 +28,7 @@
[% map_html %]
[% IF c.user && c.user.has_body_permission_to('planned_reports') %]
- <p id="sub_map_links">
+ <p class="sub-map-links" id="sub_map_links">
<a id="fms_shortlist_all" class="hidden">[% loc('Shortlist all visible') %]</a>
</p>
[% END %]