Skip to content

Commit

Permalink
[Bexley][WW] Add bespoke templates for no-collections email sent to c…
Browse files Browse the repository at this point in the history
…lient
  • Loading branch information
nephila-nacrea authored and chrismytton committed Jul 23, 2024
1 parent 6229331 commit 068c479
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 1 deletion.
1 change: 1 addition & 0 deletions perllib/FixMyStreet/SendReport/Email.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ sub build_recipient_list {

sub get_template {
my ( $self, $row ) = @_;

return 'submit.txt';
}

Expand Down
62 changes: 62 additions & 0 deletions templates/email/bexley/waste/submit.html
Original file line number Diff line number Diff line change
@@ -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';

%]

<th style="[% td_style %][% primary_column_style %]" id="primary_column">
[% start_padded_box | safe %]
<h1 style="[% h1_style %]">New [% report.category %]</h1>
<h2 style="[% h2_style %] margin: 30px 0 10px 0">(for back office only)</h2>
<br>
<p style="[% p_style %]">
The enquiry reference number is <strong>[% report.id %]</strong>.
<br><br>
The below details have been submitted via Wasteworks for your attention because no collections were found at the property.
</p>

<h2 style="[% h2_style %] margin: 30px 0 10px 0">Submission details:</h2>
<table [% table_reset | safe %]>
<tr>
<th style="[% contact_th_style %]">Trying to report missed collection<br>for business or organisation?</th>
<td style="[% contact_td_style %]">[% report.category == 'Business or organisation missed collection enquiry' ? 'Yes' : 'No' %]</td>
</tr>
<tr>
<th style="[% contact_th_style %]">Name</th>
<td style="[% contact_td_style %]">[% report.name | html %]</td>
</tr>
<tr>
<th style="[% contact_th_style %]">Email</th>
<td style="[% contact_td_style %]">
[%~ IF report.user.email ~%]
<a href="mailto:[% report.user.email | html %]">[% report.user.email | html %]</a>
[%~ ELSE ~%]
<strong>No email address provided, only phone number</strong>
[%~ END ~%]
</td>
</tr>
[%~ IF report.user.phone %]
<tr>
<th style="[% contact_th_style %]">Phone</th>
<td style="[% contact_td_style %]"><a href="tel:[% report.user.phone | html %]">[% report.user.phone | html %]</a></td>
</tr>
[%~ END %]
</table>

[% end_padded_box | safe %]
</th>

[% WRAPPER '_email_sidebar.html' object = report %]
[% INCLUDE 'waste/_sidebar_content.html' %]
[% END %]

[% INCLUDE '_email_bottom.html' %]
35 changes: 35 additions & 0 deletions templates/email/bexley/waste/submit.txt
Original file line number Diff line number Diff line change
@@ -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.
1 change: 0 additions & 1 deletion templates/email/default/waste/other-reported.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 %],
Expand Down
4 changes: 4 additions & 0 deletions templates/email/fixmystreet.com/submit.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[% IF cobrand.moniker == 'bexley' && report.cobrand_data == 'waste' %]
[% PROCESS 'waste/submit.html' %]
[% ELSE %]
[%

PROCESS '_email_settings.html';
Expand Down Expand Up @@ -88,3 +91,4 @@ <h2 style="[% h2_style %]">[% report.title | html %]</h2>
[% END %]

[% INCLUDE '_email_bottom.html' %]
[% END %]
4 changes: 4 additions & 0 deletions templates/email/fixmystreet.com/submit.txt
Original file line number Diff line number Diff line change
@@ -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 %],
Expand Down Expand Up @@ -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 <support@fixmystreet.com>.
[% END %]
[% END %]

0 comments on commit 068c479

Please sign in to comment.