Skip to content

Commit d8c0e79

Browse files
authored
Merge pull request #1561 from alphagov/reapply-email-rebrand-changes
Reapply email rebrand changes
2 parents 78d7c85 + 8d08cbb commit d8c0e79

File tree

10 files changed

+180
-156
lines changed

10 files changed

+180
-156
lines changed

app/lib/ses_email_formatter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def build_question_answers_section_plain_text(completed_steps)
2121
private
2222

2323
def prep_question_title_html(page)
24-
"<h2>#{prep_question_title_plain_text(page)}</h2>"
24+
"<h3>#{prep_question_title_plain_text(page)}</h3>"
2525
end
2626

2727
def prep_answer_text_html(page)

app/views/aws_ses_form_submission_mailer/submission_email.html.erb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<p>
2-
<%= if @mailer_options.is_preview
3-
I18n.t("mailer.submission.title_preview", title: @mailer_options.title)
4-
else
5-
I18n.t("mailer.submission.title", title: @mailer_options.title)
6-
end
7-
%>
8-
</p>
1+
<% if @mailer_options.is_preview %>
2+
<p>
3+
<%= I18n.t("mailer.submission.preview") %>
4+
</p>
5+
<% end %>
6+
7+
<p><%= I18n.t("mailer.submission.title", title: @mailer_options.title) %></p>
8+
99
<p>
1010
<%= I18n.t("mailer.submission.time", time: @mailer_options.timestamp.strftime("%l:%M%P").strip, date: @mailer_options.timestamp.strftime("%-d %B %Y") ) %>
1111
</p>
@@ -25,14 +25,14 @@
2525

2626
<hr style="border: 0; height: 1px; background: #B1B4B6; margin: 30px 0 30px 0;">
2727

28-
<%= @answer_content_html.html_safe %>
28+
<h2><%= I18n.t("mailer.submission.answers_submitted") %></h2>
2929

3030
<% if @csv_filename.present? %>
31-
<hr style="border: 0; height: 1px; background: #B1B4B6; margin: 30px 0 30px 0;">
32-
<h2><%= I18n.t("mailer.submission.csv_file") %></h2>
33-
<p><%= I18n.t("mailer.submission.file_attached", filename: @csv_filename) %></p>
31+
<p><%= I18n.t("mailer.submission.csv_file", filename: @csv_filename) %></p>
3432
<% end %>
3533

34+
<%= @answer_content_html.html_safe %>
35+
3636
<hr style="border: 0; height: 1px; background: #B1B4B6; margin: 30px 0 30px 0;">
3737

3838
<div

app/views/aws_ses_form_submission_mailer/submission_email.text.erb

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
<%= if @mailer_options.is_preview
2-
I18n.t("mailer.submission.title_preview", title: @mailer_options.title)
3-
else
4-
I18n.t("mailer.submission.title", title: @mailer_options.title)
5-
end
6-
%>
1+
<% if @mailer_options.is_preview %>
2+
<%= I18n.t("mailer.submission.preview") %>
3+
4+
<% end %>
5+
<%= I18n.t("mailer.submission.title", title: @mailer_options.title) %>
76

87
<%= I18n.t("mailer.submission.time", time: @mailer_options.timestamp.strftime("%l:%M%P").strip, date: @mailer_options.timestamp.strftime("%-d %B %Y") ) %>
98

109
<%= I18n.t("mailer.submission.reference", submission_reference: @mailer_options.submission_reference) %>
1110

1211
<% if @mailer_options.payment_url.present? %>
13-
<%= I18n.t("mailer.submission.payment") %>
12+
<%= I18n.t("mailer.submission.payment") %>
1413

1514
<% end %>
1615
<%= I18n.t("mailer.submission.check_before_using") %>
1716

1817
---
19-
20-
<%= @answer_content_plain_text %>
18+
<%= I18n.t("mailer.submission.answers_submitted") %>
2119

2220
<% if @csv_filename.present? %>
23-
---
24-
25-
<%= I18n.t("mailer.submission.csv_file") %>
26-
27-
<%= I18n.t("mailer.submission.file_attached", filename: @csv_filename) %>
21+
<%= I18n.t("mailer.submission.csv_file", filename: @csv_filename) %>
2822
<% end %>
2923

24+
<%= @answer_content_plain_text %>
25+
3026
---
3127

3228
<%= I18n.t("mailer.submission.cannot_reply.heading") %>

app/views/layouts/mailer.html.erb

Lines changed: 85 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
<!-- BEGIN app/views/layouts/mailer.html.erb -->
22

3+
<%# Based on Notify's email template: https://github.com/alphagov/notifications-utils/blob/main/notifications_utils/jinja_templates/email_template.jinja2 %>
4+
35
<!DOCTYPE html>
46
<html lang="en">
57

68
<head>
79
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
810
<meta content="telephone=no" name="format-detection"> <!-- need to add formatting for real phone numbers -->
911
<meta name="viewport" content="width=device-width">
10-
<title>{{ subject }}</title>
12+
<title><%= @subject %></title>
1113

1214
<style>
1315
@media only screen and (min-device-width: 581px) {
1416
.content {
1517
width: 580px !important;
1618
}
1719
}
20+
@media only print {
21+
.logo__crown { display: none !important; }
22+
.logo__text, .logo__dot { color: #000000 !important; }
23+
.brand__banner {
24+
border-bottom: solid 1pt #000000 !important;
25+
background-color: unset !important;
26+
}
27+
}
1828
body { margin:0 !important; }
1929
div[style*="margin: 16px 0"] { margin:0 !important; }
2030
</style>
@@ -36,71 +46,78 @@
3646
<body style="font-family: Helvetica, Arial, sans-serif;font-size: 16px;margin: 0;color:#0b0c0c;">
3747
<table role="presentation" width="100%" style="border-collapse: collapse;min-width: 100%;width: 100% !important;" cellpadding="0" cellspacing="0" border="0">
3848
<tr>
39-
<td width="100%" height="53" bgcolor="#0b0c0c">
49+
<td width="100%" height="60" bgcolor="#1d70b8" class="brand__banner">
4050
<!--[if (gte mso 9)|(IE)]>
4151
<table role="presentation" width="580" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;width: 580px;">
4252
<tr>
4353
<td>
4454
<![endif]-->
4555
<table role="presentation" width="100%" style="border-collapse: collapse;max-width: 580px;" cellpadding="0" cellspacing="0" border="0" align="center">
4656
<tr>
47-
<td width="70" bgcolor="#0b0c0c" valign="middle">
48-
<a href="https://www.gov.uk" title="Go to the GOV.UK homepage" style="text-decoration: none;">
49-
<table role="presentation" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;">
50-
<tr>
51-
<td style="padding-left: 10px">
52-
<img src="https://static.notifications.service.gov.uk/images/govuk-logotype-tudor-crown.png"
53-
alt=""
54-
height="32"
55-
border="0"
56-
style="Margin-top: 2px;"
57-
>
58-
</td>
59-
<td style="font-size: 28px; line-height: 1.315789474; Margin-top: 4px; padding-left: 8px;">
60-
<span style="
61-
font-family: Helvetica, Arial, sans-serif;
62-
font-weight: 700;
63-
color: #ffffff;
64-
text-decoration: none;
65-
vertical-align:middle;
66-
display: inline-block;
67-
">GOV.UK</span>
68-
</td>
69-
</tr>
70-
</table>
71-
</a>
72-
</td>
73-
</tr>
74-
</table>
75-
<!--[if (gte mso 9)|(IE)]>
76-
</td>
77-
</tr>
78-
</table>
79-
<![endif]-->
80-
</td>
81-
</tr>
82-
</table>
83-
<table
84-
role="presentation"
85-
class="content"
86-
align="center"
87-
cellpadding="0"
88-
cellspacing="0"
89-
border="0"
90-
style="border-collapse: collapse;max-width: 580px; width: 100% !important;"
91-
width="100%"
92-
>
93-
<tr>
94-
<td width="10" height="10" valign="middle"></td>
95-
<td>
96-
<!--[if (gte mso 9)|(IE)]>
97-
<table role="presentation" width="560" align="center" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;width: 560px;">
98-
<tr>
99-
<td height="10">
100-
<![endif]-->
101-
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;">
102-
<tr>
103-
<td bgcolor="#1D70B8" width="100%" height="10"></td>
57+
<!--[if mso]>
58+
<td width="70" valign="middle">
59+
<a href="https://www.gov.uk" title="Go to the GOV.UK homepage" style="text-decoration: none;">
60+
<table role="presentation" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;">
61+
<tr>
62+
<td style="padding-left: 10px">
63+
<img src="https://static.notifications.service.gov.uk/images/govuk-logotype-tudor-crown.png" alt="" height="32" border="0" style="Margin-top: 2px;">
64+
</td>
65+
<td style="font-size: 28px; line-height: 1.315789474; padding-left: 8px; padding-bottom: 8px">
66+
<span style="
67+
font-family: Helvetica, Arial, sans-serif;
68+
font-weight: 700;
69+
color: #ffffff;
70+
text-decoration: none;
71+
vertical-align:middle;
72+
display: inline-block"
73+
>GOV<span style="
74+
color: #00ffe0;
75+
font-family: Georgia, Times New Roman, sans-serif;
76+
font-size: 32px;
77+
mso-text-raise:7px">.</span>UK</span>
78+
</td>
79+
</tr>
80+
</table>
81+
</a>
82+
</td>
83+
<![endif]-->
84+
<!--[if !mso]><!-->
85+
<td width="70" valign="bottom">
86+
<a href="https://www.gov.uk" title="Go to the GOV.UK homepage" style="text-decoration: none;color: #fff">
87+
<table role="presentation" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;">
88+
<tr>
89+
<td style="font-size: 28px; line-height: 2; padding-left: 10px" valign="bottom" height="60" class="logo__crown">
90+
<img
91+
src="https://static.notifications.service.gov.uk/images/govuk-logotype-tudor-crown.png"
92+
alt=""
93+
height="32"
94+
border="0"
95+
style="Margin-top: 2px; max-height: 32px"
96+
aria-hidden="true"
97+
>
98+
</td>
99+
<td style="font-size: 28px; line-height: 2.1428571429; padding-left: 8px;" valign="bottom" height="60" class="logo__text">
100+
<span aria-label="GOV.UK" style="
101+
font-family: Helvetica, Arial, 'Noto Sans', sans-serif;
102+
font-weight: 700;
103+
text-decoration: none;
104+
vertical-align:middle;
105+
display: inline-block;
106+
">GOV<span style="
107+
font-family: Georgia, Times New Roman, Times, sans-serif;
108+
color: #00ffe0;
109+
display: inline-block;
110+
text-indent: 0.04em;
111+
font-size: 32px;
112+
line-height: 1.35;
113+
vertical-align: top;
114+
margin-right: 0.05em;" class="logo__dot">.</span>UK</span>
115+
</td>
116+
</tr>
117+
</table>
118+
</a>
119+
</td>
120+
<!--<![endif]-->
104121
</tr>
105122
</table>
106123
<!--[if (gte mso 9)|(IE)]>
@@ -109,19 +126,18 @@
109126
</table>
110127
<![endif]-->
111128
</td>
112-
<td width="10" valign="middle" height="10"></td>
113129
</tr>
114130
</table>
115131
<table
116-
role="presentation"
117-
class="content"
118-
align="center"
119-
cellpadding="0"
120-
cellspacing="0"
121-
border="0"
122-
style="border-collapse: collapse;max-width: 580px; width: 100% !important;"
123-
width="100%"
124-
>
132+
role="presentation"
133+
class="content"
134+
align="center"
135+
cellpadding="0"
136+
cellspacing="0"
137+
border="0"
138+
style="border-collapse: collapse;max-width: 580px; width: 100% !important;"
139+
width="100%"
140+
>
125141
<tr>
126142
<td height="30"><br>
127143
</td>
@@ -135,9 +151,7 @@
135151
<tr>
136152
<td style="font-family: Helvetica, Arial, sans-serif; font-size: 19px; line-height: 1.315789474;">
137153
<![endif]-->
138-
139154
<%= yield %>
140-
141155
<!--[if (gte mso 9)|(IE)]>
142156
</td>
143157
</tr>

config/locales/cy.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,24 +423,25 @@ cy:
423423
skip_link: Neidio i’r prif gynnwys
424424
mailer:
425425
submission:
426+
answers_submitted: Answers submitted
426427
cannot_reply:
427428
contact_form_filler_html: "<p>If you need to contact the person who completed this form, you’ll need to contact them directly.</p>"
428429
contact_form_filler_plain: If you need to contact the person who completed this form, you’ll need to contact them directly.
429430
contact_forms_team_html: <p>If you’re experiencing a technical issue with this form, <a href="https://www.forms.service.gov.uk/support">contact the GOV.​UK Forms team</a> with details of the issue and the form it relates to.</p>
430431
contact_forms_team_plain: If you’re experiencing a technical issue with this form, contact the GOV.​UK Forms team (https://www.forms.service.gov.uk/support) with details of the issue and the form it relates to.
431432
heading: You cannot reply to this email
432-
check_before_using: Check that this data looks safe before you use it
433-
csv_file: CSV file of these answers
433+
check_before_using: Check that these answers look safe before you use them
434+
csv_file: 'A CSV file of these answers is attached to this email in a file named: %{filename}'
434435
file_attached: "%{filename} (attached to this email)"
435436
from: GOV.UK Forms <%{email_address}>
436437
payment: You can check that a payment has been made by using this reference number to search transactions within GOV.​UK Pay.
438+
preview: This is a test submission from a preview of this form.
437439
question_skipped: This question was skipped
438440
reference: 'GOV.​UK Forms reference number: %{submission_reference}'
439441
subject: 'Form submission: %{form_title} - reference: %{reference}'
440442
subject_preview: 'TEST FORM SUBMISSION: %{form_title} - reference: %{reference}'
441-
time: This form was submitted at %{time} on %{date}
442-
title: This is a completed “%{title}” form.
443-
title_preview: This is a test of the “%{title}” form.
443+
time: 'Submitted at: %{time} on %{date}'
444+
title: 'Form name: “%{title}”'
444445
submission_confirmation:
445446
default_support_contact_details: The form’s contact details for support will appear here once they’ve been added.
446447
default_what_happens_next: The form’s information about what happens next will appear here once it has been added.

config/locales/en.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,24 +423,25 @@ en:
423423
skip_link: Skip to main content
424424
mailer:
425425
submission:
426+
answers_submitted: Answers submitted
426427
cannot_reply:
427428
contact_form_filler_html: "<p>If you need to contact the person who completed this form, you’ll need to contact them directly.</p>"
428429
contact_form_filler_plain: If you need to contact the person who completed this form, you’ll need to contact them directly.
429430
contact_forms_team_html: <p>If you’re experiencing a technical issue with this form, <a href="https://www.forms.service.gov.uk/support">contact the GOV.​UK Forms team</a> with details of the issue and the form it relates to.</p>
430431
contact_forms_team_plain: If you’re experiencing a technical issue with this form, contact the GOV.​UK Forms team (https://www.forms.service.gov.uk/support) with details of the issue and the form it relates to.
431432
heading: You cannot reply to this email
432-
check_before_using: Check that this data looks safe before you use it
433-
csv_file: CSV file of these answers
433+
check_before_using: Check that these answers look safe before you use them
434+
csv_file: 'A CSV file of these answers is attached to this email in a file named: %{filename}'
434435
file_attached: "%{filename} (attached to this email)"
435436
from: GOV.UK Forms <%{email_address}>
436437
payment: You can check that a payment has been made by using this reference number to search transactions within GOV.​UK Pay.
438+
preview: This is a test submission from a preview of this form.
437439
question_skipped: This question was skipped
438440
reference: 'GOV.​UK Forms reference number: %{submission_reference}'
439441
subject: 'Form submission: %{form_title} - reference: %{reference}'
440442
subject_preview: 'TEST FORM SUBMISSION: %{form_title} - reference: %{reference}'
441-
time: This form was submitted at %{time} on %{date}
442-
title: This is a completed “%{title}” form.
443-
title_preview: This is a test of the “%{title}” form.
443+
time: 'Submitted at: %{time} on %{date}'
444+
title: 'Form name: “%{title}”'
444445
submission_confirmation:
445446
default_support_contact_details: The form’s contact details for support will appear here once they’ve been added.
446447
default_what_happens_next: The form’s information about what happens next will appear here once it has been added.

0 commit comments

Comments
 (0)