aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/alert/list-ajax.html2
-rw-r--r--templates/web/base/alert/list.html2
-rwxr-xr-xtemplates/web/base/around/display_location.html1
-rw-r--r--templates/web/base/js/translation_strings.html3
-rw-r--r--templates/web/base/report/_inspect.html7
-rw-r--r--templates/web/base/report/nearby.html2
-rw-r--r--templates/web/base/report/new/duplicate_suggestions.html42
-rw-r--r--templates/web/base/report/new/fill_in_details.html2
-rw-r--r--templates/web/base/report/new/form_report.html1
9 files changed, 57 insertions, 5 deletions
diff --git a/templates/web/base/alert/list-ajax.html b/templates/web/base/alert/list-ajax.html
index 639af6f07..5da71b58c 100644
--- a/templates/web/base/alert/list-ajax.html
+++ b/templates/web/base/alert/list-ajax.html
@@ -4,6 +4,6 @@
%]
[% END %]
-<div id="alerts">
+<div id="alerts" class="js-alert-list">
[% INCLUDE 'alert/_list.html' %]
</div>
diff --git a/templates/web/base/alert/list.html b/templates/web/base/alert/list.html
index 385cd7d32..14215b65d 100644
--- a/templates/web/base/alert/list.html
+++ b/templates/web/base/alert/list.html
@@ -32,7 +32,7 @@
</div>
[% END %]
-<form id="alerts" name="alerts" method="post" action="/alert/subscribe">
+<form id="alerts" class="js-alert-list" name="alerts" method="post" action="/alert/subscribe">
[% INCLUDE 'alert/_list.html' %]
diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html
index 826e70632..6c71ad631 100755
--- a/templates/web/base/around/display_location.html
+++ b/templates/web/base/around/display_location.html
@@ -33,6 +33,7 @@
SET bodyclass = 'mappage';
SET rss = [ tprintf(loc('Recent local problems, %s', "%s is the site name"), site_name), rss_url ];
+ SET extra_js = [];
INCLUDE 'header.html',
title => loc('Viewing a location')
robots => 'noindex,nofollow';
diff --git a/templates/web/base/js/translation_strings.html b/templates/web/base/js/translation_strings.html
index af3073f91..9747773d9 100644
--- a/templates/web/base/js/translation_strings.html
+++ b/templates/web/base/js/translation_strings.html
@@ -41,6 +41,9 @@ fixmystreet.password_minimum_length = [% c.cobrand.password_minimum_length %];
how_to_send: '[% loc('How to send successful reports') | replace("'", "\\'") %]',
more_details: '[% loc('Details') | replace("'", "\\'") %]',
+ this_report: '[% loc('This report') | replace("'", "\\'") %]',
+ this_is_the_problem: '[% loc('This is the problem') | replace("'", "\\'") %]',
+
or: '[% loc(' or ') | replace("'", "\\'") %]',
geolocation_declined: '[% loc('You declined; please fill in the box above') | replace("'", "\\'") %]',
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html
index 76555cef8..fa79d9912 100644
--- a/templates/web/base/report/_inspect.html
+++ b/templates/web/base/report/_inspect.html
@@ -1,3 +1,6 @@
+[% extra_js = [
+ version('/js/duplicates.js'),
+] -%]
[% permissions = c.user.permissions(problem) %]
[% second_column = BLOCK -%]
<div id="side-inspect">
@@ -120,7 +123,7 @@
<p class="[% "hidden" IF problem.duplicate_of %]">[% loc('Which report is it a duplicate of?') %]</p>
<ul class="item-list item-list--inspect-duplicates">
[% IF problem.duplicate_of %]
- [% INCLUDE 'report/_item.html' item_extra_class = 'item-list__item--selected' problem = problem.duplicate_of %]
+ [% INCLUDE 'report/_item_expandable.html' item_extra_class = 'item-list__item--selected' problem = problem.duplicate_of %]
<li class="item-list__item"><a class="btn" href="#" id="js-change-duplicate-report">[% loc('Choose another') %]</a></li>
[% END %]
</ul>
@@ -129,7 +132,7 @@
<p><strong>[% loc('Duplicates') %]</strong></p>
<ul class="item-list item-list--inspect-duplicates">
[% FOR duplicate IN problem.duplicates %]
- [% INCLUDE 'report/_item.html' problem = duplicate %]
+ [% INCLUDE 'report/_item_expandable.html' problem = duplicate %]
[% END %]
</ul>
[% END %]
diff --git a/templates/web/base/report/nearby.html b/templates/web/base/report/nearby.html
index c64b10d7f..1e0d6cc79 100644
--- a/templates/web/base/report/nearby.html
+++ b/templates/web/base/report/nearby.html
@@ -1,3 +1,3 @@
[%~ FOREACH problem IN reports ~%]
- [%~ INCLUDE 'reports/_list-entry.html' ~%]
+ [%~ INCLUDE 'report/_item_expandable.html' ~%]
[%~ END ~%]
diff --git a/templates/web/base/report/new/duplicate_suggestions.html b/templates/web/base/report/new/duplicate_suggestions.html
new file mode 100644
index 000000000..582ba58e9
--- /dev/null
+++ b/templates/web/base/report/new/duplicate_suggestions.html
@@ -0,0 +1,42 @@
+[% IF c.cobrand.suggest_duplicates %]
+[% extra_js.push(
+ version('/js/duplicates.js'),
+) -%]
+<div id="js-duplicate-reports" class="duplicate-report-suggestions hidden">
+ <button class="duplicate-report-suggestions__close js-hide-duplicate-suggestions">[% loc('Close') %]</button>
+ <h2 class="form-section-heading">[% loc('Already been reported?') %]</h2>
+ <div class="form-section-description">
+ [% IF c.cobrand.is_council %]
+ <p>[% loc('There are similar problems nearby that we’re already aware of, is one of them yours?') %]</p>
+ [% ELSE %]
+ <p>[% loc('We’ve already reported these nearby problems to the council. Is one of them yours?') %]</p>
+ [% END %]
+ </div>
+
+ <ul class="item-list"></ul>
+ <button class="btn btn--block js-hide-duplicate-suggestions">[% loc('Continue – report a new problem') %]</button>
+</div>
+<div class="js-template-get-updates hidden">
+ <div id="alerts" class="get-updates js-alert-list">
+ <p id="rznvy_hint">
+ [% IF c.user_exists %]
+ [% loc('Would you like us to notify you when this problem is updated or fixed?') %]
+ [% ELSE %]
+ [% loc('If you let us know your email address, we’ll notify you when this problem is updated or fixed.') %]
+ [% END %]
+ </p>
+ <input type="hidden" name="id" disabled>
+ <input type="hidden" name="token" value="[% csrf_token %]" disabled>
+ <input type="hidden" name="type" value="updates" disabled>
+ [% IF c.user_exists %]
+ <input type="submit" value="[% loc('Get updates') %]" class="btn btn--block" id="alert_email_button">
+ [% ELSE %]
+ <label for="rznvy_input">[% loc('Your email') %]</label>
+ <div class="form-txt-submit-box">
+ <input type="email" class="form-control" name="rznvy" id="rznvy_input" aria-described-by="rznvy_hint" disabled>
+ <input type="submit" value="[% loc('Get updates') %]" class="btn" id="alert_email_button">
+ </div>
+ [% END %]
+ </div>
+</div>
+[% END %]
diff --git a/templates/web/base/report/new/fill_in_details.html b/templates/web/base/report/new/fill_in_details.html
index 8fa1253da..fa7aabce3 100644
--- a/templates/web/base/report/new/fill_in_details.html
+++ b/templates/web/base/report/new/fill_in_details.html
@@ -4,6 +4,8 @@
SET bodyclass = '';
SET bodyclass = 'mappage';
SET bodyclass = bodyclass _ " with-notes" IF sidebar_html;
+ SET extra_js = [];
+ PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html" IF report.used_map;
INCLUDE 'header.html', title => loc('Reporting a problem');
%]
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html
index 39e29c723..a5b378641 100644
--- a/templates/web/base/report/new/form_report.html
+++ b/templates/web/base/report/new/form_report.html
@@ -7,6 +7,7 @@
[% PROCESS "report/new/category_wrapper.html" %]
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
+[% PROCESS "report/new/duplicate_suggestions.html" %]
<div class="js-hide-if-invalid-category">
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]