aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-03-28 19:16:37 +0100
committerDave Arter <davea@mysociety.org>2018-04-03 12:44:25 +0100
commit52cbba4a73df032eb9ed3cad13ac7892bf2604d1 (patch)
tree1c324e0749bd4ef8da6cd6fe3d29ac354eb3f003
parentb891a013752f5db27401962db70fe725198fef24 (diff)
[Buckinghamshire] Include Confirm ID in report confirmation emails
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm2
-rw-r--r--templates/email/buckinghamshire/_council_reference.html2
-rw-r--r--templates/email/buckinghamshire/_council_reference.txt2
-rw-r--r--templates/email/buckinghamshire/confirm_report_sent.html31
-rw-r--r--templates/email/buckinghamshire/confirm_report_sent.txt29
-rw-r--r--templates/email/buckinghamshire/other-reported.html34
-rw-r--r--templates/email/buckinghamshire/other-reported.txt30
-rw-r--r--templates/email/default/other-updated.html3
-rw-r--r--templates/email/default/other-updated.txt2
-rw-r--r--templates/web/buckinghamshire/tokens/confirm_problem.html44
10 files changed, 178 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
index adceebfb4..f0b6b459e 100644
--- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -282,4 +282,6 @@ sub should_skip_sending_update {
sub disable_phone_number_entry { 1 }
+sub report_sent_confirmation_email { 1 }
+
1;
diff --git a/templates/email/buckinghamshire/_council_reference.html b/templates/email/buckinghamshire/_council_reference.html
new file mode 100644
index 000000000..b8f72c8f9
--- /dev/null
+++ b/templates/email/buckinghamshire/_council_reference.html
@@ -0,0 +1,2 @@
+<p style="[% p_style %]">The report's reference number is <strong>[% problem.external_id %]</strong>.
+ Please quote this if you need to contact the council about this report.</p>
diff --git a/templates/email/buckinghamshire/_council_reference.txt b/templates/email/buckinghamshire/_council_reference.txt
new file mode 100644
index 000000000..3c92f3666
--- /dev/null
+++ b/templates/email/buckinghamshire/_council_reference.txt
@@ -0,0 +1,2 @@
+The report's reference number is [% problem.external_id %]. Please quote this if
+you need to contact the council about this report.
diff --git a/templates/email/buckinghamshire/confirm_report_sent.html b/templates/email/buckinghamshire/confirm_report_sent.html
new file mode 100644
index 000000000..0fcb46e41
--- /dev/null
+++ b/templates/email/buckinghamshire/confirm_report_sent.html
@@ -0,0 +1,31 @@
+[%
+
+email_summary = "Thanks for logging your report";
+email_columns = 2;
+
+PROCESS '_email_settings.html';
+INCLUDE '_email_top.html';
+
+%]
+
+<th style="[% td_style %][% primary_column_style %]" id="primary_column">
+ [% start_padded_box %]
+ <h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
+ <p style="[% p_style %]">Your report to [% report.body %] has been logged on [% site_name %].</p>
+[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
+<p style="[% p_style %]">Please note that [% c.cobrand.council_name %] is not responsible for this type
+of report, so it will instead be sent to [% report.body %].</p>
+[% ELSE %]
+[% TRY %][% INCLUDE '_council_reference.html' problem=report %][% CATCH file %][% END %]
+[% END %]
+ <p style="margin: 20px auto; text-align: center">
+ <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.url %]">View my report</a>
+ </p>
+ [% end_padded_box %]
+</th>
+[% WRAPPER '_email_sidebar.html' object = report %]
+ <h2 style="[% h2_style %]">[% report.title | html %]</h2>
+ <p style="[% secondary_p_style %]">[% report.detail | html %]</p>
+[% END %]
+
+[% INCLUDE '_email_bottom.html' %] \ No newline at end of file
diff --git a/templates/email/buckinghamshire/confirm_report_sent.txt b/templates/email/buckinghamshire/confirm_report_sent.txt
new file mode 100644
index 000000000..bdcedcfda
--- /dev/null
+++ b/templates/email/buckinghamshire/confirm_report_sent.txt
@@ -0,0 +1,29 @@
+Subject: Your report has been logged: [% report.title %]
+
+Hello [% report.name %],
+
+Your report to [% report.body %] has been logged on [% site_name %].
+
+[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
+Please note that [% c.cobrand.council_name %] is not responsible for this type
+of report, so it will instead be sent to [% report.body %].
+[% ELSE %]
+[% TRY %][% INCLUDE '_council_reference.txt' problem=report %][% CATCH file %][% END %]
+[% END %]
+
+It is available to view at:
+
+[% cobrand.base_url_for_report(report) %][% report.url %]
+
+Your report has the title:
+
+[% report.title %]
+
+And details:
+
+[% report.detail %]
+
+[% INCLUDE 'signature.txt' %]
+
+This email was sent automatically, from an unmonitored email account - so
+please do not reply to it. \ No newline at end of file
diff --git a/templates/email/buckinghamshire/other-reported.html b/templates/email/buckinghamshire/other-reported.html
new file mode 100644
index 000000000..85ba08f97
--- /dev/null
+++ b/templates/email/buckinghamshire/other-reported.html
@@ -0,0 +1,34 @@
+[%
+
+email_summary = "Thanks for logging your report";
+email_columns = 2;
+
+PROCESS '_email_settings.html';
+INCLUDE '_email_top.html';
+
+%]
+
+<th style="[% td_style %][% primary_column_style %]" id="primary_column">
+ [% start_padded_box %]
+ <h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
+ <p style="[% p_style %]">Your report to [% report.body %] has been logged on [% site_name %].
+[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
+Please note that [% c.cobrand.council_name %] is not responsible for this type
+of report, so it will instead be sent to [% report.body %].
+[% ELSE %]
+ </p>
+ <p style="[% p_style %]">This report's reference number is <strong>[% report.external_id %]</strong>.
+ Please quote this if you need to contact the council about this report.
+[% END %]
+ </p>
+ <p style="margin: 20px auto; text-align: center">
+ <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.url %]">View my report</a>
+ </p>
+ [% end_padded_box %]
+</th>
+[% WRAPPER '_email_sidebar.html' object = report %]
+ <h2 style="[% h2_style %]">[% report.title | html %]</h2>
+ <p style="[% secondary_p_style %]">[% report.detail | html %]</p>
+[% END %]
+
+[% INCLUDE '_email_bottom.html' %] \ No newline at end of file
diff --git a/templates/email/buckinghamshire/other-reported.txt b/templates/email/buckinghamshire/other-reported.txt
new file mode 100644
index 000000000..933d66b54
--- /dev/null
+++ b/templates/email/buckinghamshire/other-reported.txt
@@ -0,0 +1,30 @@
+Subject: Your report has been logged: [% report.title %]
+
+Hello [% report.name %],
+
+Your report to [% report.body %] has been logged on [% site_name %].
+
+[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
+Please note that [% c.cobrand.council_name %] is not responsible for this type
+of report, so it will instead be sent to [% report.body %].
+[% ELSE %]
+This report's reference number is [% report.external_id %]. Please quote this if you
+need to contact the council about this report.
+[% END %]
+
+It is available to view at:
+
+[% cobrand.base_url_for_report(report) %][% report.url %]
+
+Your report has the title:
+
+[% report.title %]
+
+And details:
+
+[% report.detail %]
+
+[% INCLUDE 'signature.txt' %]
+
+This email was sent automatically, from an unmonitored email account - so
+please do not reply to it. \ No newline at end of file
diff --git a/templates/email/default/other-updated.html b/templates/email/default/other-updated.html
index 27eba9007..e7f09e123 100644
--- a/templates/email/default/other-updated.html
+++ b/templates/email/default/other-updated.html
@@ -11,7 +11,8 @@ INCLUDE '_email_top.html';
<th style="[% td_style %][% primary_column_style %]" id="primary_column">
[% start_padded_box %]
<h1 style="[% h1_style %]">Your update has been&nbsp;logged</h1>
- <p style="[% p_style %]">Your update has been logged on [% site_name %]:</p>
+ <p style="[% p_style %]">Your update has been logged on [% site_name %].</p>
+ [% TRY %][% INCLUDE '_council_reference.html' %][% CATCH file %][% END %]
<p style="margin: 20px auto; text-align: center">
<a style="[% button_style %]" href="[% cobrand.base_url_for_report(problem) %][% update.url %]">View my update</a>
</p>
diff --git a/templates/email/default/other-updated.txt b/templates/email/default/other-updated.txt
index 7e5631ef1..21ea68863 100644
--- a/templates/email/default/other-updated.txt
+++ b/templates/email/default/other-updated.txt
@@ -6,6 +6,8 @@ Your update has been logged on [% site_name %]:
[% cobrand.base_url_for_report(problem) %][% update.url %]
+[% TRY %][% INCLUDE '_council_reference.txt' %][% CATCH file %][% END %]
+
Your update reads:
[% update.text %]
diff --git a/templates/web/buckinghamshire/tokens/confirm_problem.html b/templates/web/buckinghamshire/tokens/confirm_problem.html
new file mode 100644
index 000000000..9b3063b5e
--- /dev/null
+++ b/templates/web/buckinghamshire/tokens/confirm_problem.html
@@ -0,0 +1,44 @@
+[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Confirmation') %]
+
+<div class="confirmation-header">
+
+ <h1><a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]">[% report.title %]</a></h1>
+
+ [% IF c.cobrand.is_council %]
+ [% IF c.cobrand.owns_problem( report ) %]
+ <h2>Your issue is on its way to the council.</h2>
+ <p>You will receive an email with a reference number for this report soon, please quote it in any enquiries.</p>
+ [% ELSE %]
+ <h2>Thank you for your report.</h2>
+ <p>
+ We don&rsquo;t handle this type of problem, so have passed it on to:
+ </p>
+ <p>
+ <b>[% report.body %]</b>
+ </p>
+ <p>
+ You can follow this problem on <a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]">FixMyStreet.com</a>.
+ </p>
+ [% END %]
+
+ [% ELSE %]
+ <h2>[% loc('Thank you for reporting this issue!') %]</h2>
+ [% IF report.bodies_str %]
+ <p>[% loc('It’s on its way to the council right now.') %]</p>
+ [% END %]
+
+ [% END %]
+
+[% TRY %][% INCLUDE 'tokens/_extras_confirm.html' %][% CATCH file %][% END %]
+
+</div>
+
+[% INCLUDE
+ next_steps.html,
+ just_interacted = 1,
+ utm_content = 'problem confirmed',
+ share_url = c.cobrand.base_url_for_report(report) _ report.url,
+ twitter_comment = loc('I just reported a problem on @fixmystreet')
+%]
+
+[% INCLUDE 'footer.html' %]