aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-02-19 15:47:37 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-02-19 18:25:50 +0000
commitee386f44aeebe7814f258b3ba4a756e903c89719 (patch)
tree397fee3f5eb57b1768de3ae592c98275bf65bbf1 /templates
parent6f997f16abba3b649d939f35abd7607076424fa9 (diff)
Always show confirmation page for reports/updates.
Rather than redirecting to the report if they're already logged in. Fixes #1003.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report_created.html9
-rw-r--r--templates/web/base/tokens/confirm_problem.html8
-rw-r--r--templates/web/base/tokens/confirm_update.html18
-rw-r--r--templates/web/emptyhomes/tokens/confirm_problem.html4
-rwxr-xr-xtemplates/web/fixmystreet.com/report/_extras_top.html3
-rw-r--r--templates/web/fixmystreet.com/tracking_code.html2
-rw-r--r--templates/web/fixmystreet/report/display.html2
-rw-r--r--templates/web/hart/tokens/confirm_problem.html8
-rw-r--r--templates/web/seesomething/tokens/confirm_problem.html (renamed from templates/web/seesomething/report_created.html)0
-rw-r--r--templates/web/zerotb/report/display.html6
-rw-r--r--templates/web/zurich/tokens/confirm_problem.html4
11 files changed, 23 insertions, 41 deletions
diff --git a/templates/web/base/report_created.html b/templates/web/base/report_created.html
deleted file mode 100644
index 81083654b..000000000
--- a/templates/web/base/report_created.html
+++ /dev/null
@@ -1,9 +0,0 @@
-[% INCLUDE 'header.html', title => loc('Report created') %]
-
-<h1>[% loc("Report created") %]</h1>
-
-<p>
-[% loc('Your report has been created and will shortly be sent.') %]
-</p>
-
-[% INCLUDE 'footer.html' %]
diff --git a/templates/web/base/tokens/confirm_problem.html b/templates/web/base/tokens/confirm_problem.html
index 524339cf6..5892d0f9e 100644
--- a/templates/web/base/tokens/confirm_problem.html
+++ b/templates/web/base/tokens/confirm_problem.html
@@ -2,15 +2,15 @@
<div class="confirmation-header">
- <h1><a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">[% problem.title %]</a></h1>
+ <h1><a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]">[% report.title %]</a></h1>
[% IF c.cobrand.is_council %]
<h2>Your issue is on its way to the council.</h2>
- <p>Your reference for this problem is [% problem.id %], please quote it in any enquiries.</p>
+ <p>Your reference for this report is [% report.id %], please quote it in any enquiries.</p>
[% ELSE %]
<h2>[% loc('Thank you for reporting this issue!') %]</h2>
- [% IF problem.bodies_str %]
+ [% IF report.bodies_str %]
<p>[% loc('It’s on its way to the council right now.') %]</p>
[% END %]
@@ -23,7 +23,7 @@
[% INCLUDE
next_steps.html,
just_interacted = 1,
- share_url = c.cobrand.base_url_for_report(problem) _ problem.url,
+ share_url = c.cobrand.base_url_for_report(report) _ report.url,
twitter_comment = loc('I just reported a problem on @fixmystreet')
%]
diff --git a/templates/web/base/tokens/confirm_update.html b/templates/web/base/tokens/confirm_update.html
index a230894ef..01ac992ab 100644
--- a/templates/web/base/tokens/confirm_update.html
+++ b/templates/web/base/tokens/confirm_update.html
@@ -1,14 +1,16 @@
-[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title => loc('Confirmation') %]
+[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Confirmation');
-[% IF creator_fixed %]
- [% problem_url = c.uri_for('/report', problem_id) %]
-[% ELSE %]
- [% problem_url = c.uri_for( '/report', update.problem.id ) _ '#update_' _ update.id %]
-[% END %]
+DEFAULT problem = update.problem;
+SET problem_url = c.uri_for('/report', problem.id);
+IF update;
+ problem_url = problem_url _ '#update_' _ update.id;
+END;
+
+%]
<div class="confirmation-header">
- <h1><a href="[% problem_url %]">[% update.problem.title %]</a></h1>
+ <h1><a href="[% problem_url %]">[% problem.title %]</a></h1>
<h2>[% loc('Thank you for updating this issue!') %]</h2>
@@ -17,7 +19,7 @@
[% INCLUDE
next_steps.html,
just_interacted = 1,
- share_url = c.cobrand.base_url_for_report(update.problem) _ update.problem.url,
+ share_url = c.cobrand.base_url_for_report(problem) _ problem.url,
twitter_comment = loc('I just updated a problem on @fixmystreet')
%]
diff --git a/templates/web/emptyhomes/tokens/confirm_problem.html b/templates/web/emptyhomes/tokens/confirm_problem.html
index 5e77ca59f..a8a025058 100644
--- a/templates/web/emptyhomes/tokens/confirm_problem.html
+++ b/templates/web/emptyhomes/tokens/confirm_problem.html
@@ -2,7 +2,7 @@
<h1>[% loc('Confirmation') %]</h1>
-[% IF problem.bodies_str %]
+[% IF report.bodies_str %]
<p>[%
loc(
'Thank you for reporting an empty property on ReportEmptyHomes.com. We have emailed the lead officer for empty homes in the council responsible with details, and asked them to do whatever they can to get the empty property back into use as soon as possible.'
@@ -36,7 +36,7 @@ as possible will be covered.')
[% END %]
<p>
- <a href="[% c.uri_for( '/report', problem.id ) | html %]">[% loc('View your report') %]</a>.
+ <a href="[% c.uri_for( '/report', report.id ) | html %]">[% loc('View your report') %]</a>.
</p>
[% INCLUDE 'footer.html' %]
diff --git a/templates/web/fixmystreet.com/report/_extras_top.html b/templates/web/fixmystreet.com/report/_extras_top.html
deleted file mode 100755
index 4938e8749..000000000
--- a/templates/web/fixmystreet.com/report/_extras_top.html
+++ /dev/null
@@ -1,3 +0,0 @@
-[% IF created_report %]
- [% INCLUDE 'research/survey_link.html' %]
-[% END %]
diff --git a/templates/web/fixmystreet.com/tracking_code.html b/templates/web/fixmystreet.com/tracking_code.html
index 23bd8d992..3b163f516 100644
--- a/templates/web/fixmystreet.com/tracking_code.html
+++ b/templates/web/fixmystreet.com/tracking_code.html
@@ -20,7 +20,7 @@ ga(function(tracker) {
tracker.set('location', page + extra);
});
ga('ecommerce:addItem', {
- 'id': 'report/[% problem.id %]',
+ 'id': 'report/[% report.id %]',
'quantity': '1',
'name': 'Report'
});
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
index 314b09b28..91762e022 100644
--- a/templates/web/fixmystreet/report/display.html
+++ b/templates/web/fixmystreet/report/display.html
@@ -17,8 +17,6 @@
<p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
[% END %]
-[% TRY %][% INCLUDE 'report/_extras_top.html' %][% CATCH file %][% END %]
-
[% INCLUDE 'report/banner.html' %]
[% INCLUDE 'report/_main.html' %]
diff --git a/templates/web/hart/tokens/confirm_problem.html b/templates/web/hart/tokens/confirm_problem.html
index d5b6075ff..68223e92b 100644
--- a/templates/web/hart/tokens/confirm_problem.html
+++ b/templates/web/hart/tokens/confirm_problem.html
@@ -4,16 +4,16 @@
<p class="confirmed">
Thank you. You have successfully confirmed your report
-[% IF c.cobrand.owns_problem( problem ) %]
+[% IF c.cobrand.owns_problem( report ) %]
and this will now be investigated by the council.
-You can <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">view the problem on this site</a>.
+You can <a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]">view the report on this site</a>.
[% ELSE %]
and this has now been passed on to [%# TODO make this generic %] <b>Hampshire County Council</b> to investigate.
-Note that Hart District Council is not responsible for this type of problem. However you can continue to view your problem on the <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]"><i>fixmystreet.com</i> website</a>.
+Note that Hart District Council is not responsible for this type of problem. However you can continue to view your report on the <a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]"><i>fixmystreet.com</i> website</a>.
[% END %]
</p>
-<p>Your reference for this problem is [% problem.id %], please quote it in any enquiries.
+<p>Your reference for this report is [% report.id %], please quote it in any enquiries.
</p>
[% INCLUDE 'footer.html' %]
diff --git a/templates/web/seesomething/report_created.html b/templates/web/seesomething/tokens/confirm_problem.html
index 4a11d14b4..4a11d14b4 100644
--- a/templates/web/seesomething/report_created.html
+++ b/templates/web/seesomething/tokens/confirm_problem.html
diff --git a/templates/web/zerotb/report/display.html b/templates/web/zerotb/report/display.html
index 697b5428c..9848c89db 100644
--- a/templates/web/zerotb/report/display.html
+++ b/templates/web/zerotb/report/display.html
@@ -15,12 +15,6 @@
[% INCLUDE 'report/banner.html' %]
-[% IF c.flash.comment_created %]
-<p>
-[% loc('Your report has been sent') %]
-</p>
-[% END %]
-
[% INCLUDE 'report/_main.html' %]
<div class="shadow-wrap">
diff --git a/templates/web/zurich/tokens/confirm_problem.html b/templates/web/zurich/tokens/confirm_problem.html
index d61cf3ffa..d2025f124 100644
--- a/templates/web/zurich/tokens/confirm_problem.html
+++ b/templates/web/zurich/tokens/confirm_problem.html
@@ -6,8 +6,8 @@
loc('You have successfully confirmed your email address.');
tprintf(
loc( 'You can <a href="%s%s">view the problem on this site</a>.' ),
- c.cobrand.base_url_for_report( problem ),
- problem.url
+ c.cobrand.base_url_for_report( report ),
+ report.url
);
%]
</p>