From 068c479faded2301cbd6ed3e0ddf37c6d3cc193e Mon Sep 17 00:00:00 2001 From: Victoria Mihell-Hale Date: Wed, 10 Jul 2024 20:23:44 +0100 Subject: [PATCH] [Bexley][WW] Add bespoke templates for no-collections email sent to client --- perllib/FixMyStreet/SendReport/Email.pm | 1 + templates/email/bexley/waste/submit.html | 62 +++++++++++++++++++ templates/email/bexley/waste/submit.txt | 35 +++++++++++ .../email/default/waste/other-reported.txt | 1 - templates/email/fixmystreet.com/submit.html | 4 ++ templates/email/fixmystreet.com/submit.txt | 4 ++ 6 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 templates/email/bexley/waste/submit.html create mode 100644 templates/email/bexley/waste/submit.txt diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index 37685c8baea..1740578621c 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -49,6 +49,7 @@ sub build_recipient_list { sub get_template { my ( $self, $row ) = @_; + return 'submit.txt'; } diff --git a/templates/email/bexley/waste/submit.html b/templates/email/bexley/waste/submit.html new file mode 100644 index 00000000000..6dc262e6f99 --- /dev/null +++ b/templates/email/bexley/waste/submit.html @@ -0,0 +1,62 @@ +[% # NOTE Currently, Bexley only get sent this email for no-collections enquiries %] +[% is_no_collections_enquiry = 1 %] + +[% + +email_summary = "New " _ report.category _ " submitted by a " _ site_name _ " user."; +email_footer = ""; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + + + [% start_padded_box | safe %] +

New [% report.category %]

+

(for back office only)

+
+

+ The enquiry reference number is [% report.id %]. +

+ The below details have been submitted via Wasteworks for your attention because no collections were found at the property. +

+ +

Submission details:

+ + + + + + + + + + + + + + [%~ IF report.user.phone %] + + + + + [%~ END %] +
Trying to report missed collection
for business or organisation?
[% report.category == 'Business or organisation missed collection enquiry' ? 'Yes' : 'No' %]
Name[% report.name | html %]
Email + [%~ IF report.user.email ~%] + [% report.user.email | html %] + [%~ ELSE ~%] + No email address provided, only phone number + [%~ END ~%] +
Phone[% report.user.phone | html %]
+ + [% end_padded_box | safe %] + + +[% WRAPPER '_email_sidebar.html' object = report %] + [% INCLUDE 'waste/_sidebar_content.html' %] +[% END %] + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/bexley/waste/submit.txt b/templates/email/bexley/waste/submit.txt new file mode 100644 index 00000000000..f1fae311571 --- /dev/null +++ b/templates/email/bexley/waste/submit.txt @@ -0,0 +1,35 @@ +[% # NOTE Currently, Bexley only get sent this email for no-collections enquiries ~%] +[% is_no_collections_enquiry = 1 ~%] +Subject: New [% report.category %] - Reference number: [% report.id %] + +Dear [% bodies_name %], + +A user of [% site_name %] has submitted a [% report.category %]. + +[% fuzzy %], or to provide an update on the problem, +please visit the following link: + + [% url %] + +---------- + +Trying to report missed collection +for business or organisation? [% report.category == 'Business or organisation missed collection enquiry' ? 'Yes' : 'No' %] + +Name: [% report.name %] + +Email: [% report.user.email OR "None provided" %] + +Phone: [% report.user.phone OR "None provided" %] + +---------- + +[% INCLUDE 'waste/_report_details.txt' %] + +---------- + +[% signature %] + +If there is a more appropriate email address for messages about +[% category_footer %], please let us know. This will help improve the +service for local people. We also welcome any other feedback you may have. diff --git a/templates/email/default/waste/other-reported.txt b/templates/email/default/waste/other-reported.txt index f66ffc5c76c..0bbf58baea3 100644 --- a/templates/email/default/waste/other-reported.txt +++ b/templates/email/default/waste/other-reported.txt @@ -7,7 +7,6 @@ [% END ~%] [% ELSIF cobrand.moniker == 'sutton' %][% SET prefix = 'LBS-' ~%] [% ELSE %][% SET prefix = '' %][% END ~%] -[% is_missed_collection = report.category == 'Report missed collection' ~%] Subject: [% subject_text ~%], reference [% prefix %][% report.id %] Dear [% report.name %], diff --git a/templates/email/fixmystreet.com/submit.html b/templates/email/fixmystreet.com/submit.html index fbb0f97f5e5..5a170a5196e 100644 --- a/templates/email/fixmystreet.com/submit.html +++ b/templates/email/fixmystreet.com/submit.html @@ -1,3 +1,6 @@ +[% IF cobrand.moniker == 'bexley' && report.cobrand_data == 'waste' %] + [% PROCESS 'waste/submit.html' %] +[% ELSE %] [% PROCESS '_email_settings.html'; @@ -88,3 +91,4 @@

[% report.title | html %]

[% END %] [% INCLUDE '_email_bottom.html' %] +[% END %] diff --git a/templates/email/fixmystreet.com/submit.txt b/templates/email/fixmystreet.com/submit.txt index 9a04cf4acae..79ea86cff3c 100644 --- a/templates/email/fixmystreet.com/submit.txt +++ b/templates/email/fixmystreet.com/submit.txt @@ -1,3 +1,6 @@ +[% IF cobrand.moniker == 'bexley' && report.cobrand_data == 'waste' ~%] +[% PROCESS 'waste/submit.txt' ~%] +[% ELSE ~%] Subject: Problem Report: [% report.title %] Dear [% bodies_name %], @@ -88,3 +91,4 @@ How can FixMyStreet connect directly with council systems? As a charity our goal is to help improve services for citizens and local authorities. To find out more about connecting FixMyStreet to your own systems, please get in touch at . [% END %] +[% END %]