aboutsummaryrefslogtreecommitdiffstats
path: root/templates/email
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2016-08-03 16:15:19 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-08-10 09:33:39 +0100
commite0308e6af55a95f8c6e26e331434ea61259b18b9 (patch)
tree86d97dd8a4f9a87557db7f518fb291aac30ae652 /templates/email
parent0c31945416238d7eb06543c107214adfd4b83734 (diff)
Feature to create report as body/other user.
This allows users who have the correct permissions to add reports on behalf of the body or another user. We enable editing of the email box by default, so that if JavaScript isn't available, someone can still change the email for the 'another user' option. For mysociety/fixmystreetforcouncils#10 and mysociety/fixmystreetforcouncils#11
Diffstat (limited to 'templates/email')
-rw-r--r--templates/email/default/other-reported.html30
-rw-r--r--templates/email/default/other-reported.txt27
-rw-r--r--templates/email/default/other-updated.html26
-rw-r--r--templates/email/default/other-updated.txt16
4 files changed, 99 insertions, 0 deletions
diff --git a/templates/email/default/other-reported.html b/templates/email/default/other-reported.html
new file mode 100644
index 000000000..5435e735a
--- /dev/null
+++ b/templates/email/default/other-reported.html
@@ -0,0 +1,30 @@
+[%
+
+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 %].
+[% 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' %]
diff --git a/templates/email/default/other-reported.txt b/templates/email/default/other-reported.txt
new file mode 100644
index 000000000..b626e56d9
--- /dev/null
+++ b/templates/email/default/other-reported.txt
@@ -0,0 +1,27 @@
+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 %].
+[% 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.
diff --git a/templates/email/default/other-updated.html b/templates/email/default/other-updated.html
new file mode 100644
index 000000000..fbae37268
--- /dev/null
+++ b/templates/email/default/other-updated.html
@@ -0,0 +1,26 @@
+[%
+
+email_summary = "Thanks for logging your update";
+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 update has been&nbsp;logged</h1>
+ <p style="[% p_style %]">Your update has been logged on [% site_name %]:</p>
+ <p style="margin: 20px auto; text-align: center">
+ <a style="[% button_style %]" href="[% cobrand.base_url_for_report(problem) %][% problem.url %]#update_[% update.id %]">View my update</a>
+ </p>
+ [% end_padded_box %]
+</th>
+[% WRAPPER '_email_sidebar.html'
+ object = update
+ report = problem %]
+ <p style="[% secondary_p_style %]">[% update.text | html %]</p>
+[% END %]
+
+[% INCLUDE '_email_bottom.html' %]
diff --git a/templates/email/default/other-updated.txt b/templates/email/default/other-updated.txt
new file mode 100644
index 000000000..4900f6c29
--- /dev/null
+++ b/templates/email/default/other-updated.txt
@@ -0,0 +1,16 @@
+Subject: Your update has been logged
+
+Hello [% update.name %],
+
+Your update has been logged on [% site_name %]:
+
+[% cobrand.base_url_for_report(problem) %][% problem.url %]#update_[% update.id %]
+
+Your update reads:
+
+[% update.text %]
+
+[% INCLUDE 'signature.txt' %]
+
+This email was sent automatically, from an unmonitored email account - so
+please do not reply to it.