Skip to content

Commit b8341c8

Browse files
committed
Emails template
1 parent 74ba24d commit b8341c8

File tree

7 files changed

+183
-37
lines changed

7 files changed

+183
-37
lines changed
8.31 KB
Loading

src/bundle/Resources/translations/ibexa_admin_ui.en.xliff

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,31 @@
7676
<target state="new">Select translation</target>
7777
<note>key: edit_translation.languages.select_language_title</note>
7878
</trans-unit>
79+
<trans-unit id="e7b58c781e23a49ce354cdb479f14d6f75ca6e4f" resname="forgot_user_password.mail.message">
80+
<source>We have received a request to reset the password for your account. Click "reset password" below to choose a new password:</source>
81+
<target state="new">We have received a request to reset the password for your account. Click "reset password" below to choose a new password:</target>
82+
<note>key: forgot_user_password.mail.message</note>
83+
</trans-unit>
84+
<trans-unit id="26ccb574b6cd1e49d40d32d9183db89065138be2" resname="forgot_user_password.mail.message_footer">
85+
<source>If you did not request a password reset, please ignore this email, and your password will remain the same.</source>
86+
<target state="new">If you did not request a password reset, please ignore this email, and your password will remain the same.</target>
87+
<note>key: forgot_user_password.mail.message_footer</note>
88+
</trans-unit>
89+
<trans-unit id="a5ba92910b3dc61efc12c4f42cc869975be98723" resname="forgot_user_password.mail.message_title">
90+
<source>Hello,</source>
91+
<target state="new">Hello,</target>
92+
<note>key: forgot_user_password.mail.message_title</note>
93+
</trans-unit>
94+
<trans-unit id="b7293d1f766a95b50cf3e076c5ef4cd623dc542c" resname="forgot_user_password.mail.reset_password">
95+
<source>Reset password</source>
96+
<target state="new">Reset password</target>
97+
<note>key: forgot_user_password.mail.reset_password</note>
98+
</trans-unit>
99+
<trans-unit id="5fd68a8b7cdaa23771e0e970466b4432642df1d3" resname="forgot_user_password.mail.reset_your_password">
100+
<source>Reset your password</source>
101+
<target state="new">Reset your password</target>
102+
<note>key: forgot_user_password.mail.reset_your_password</note>
103+
</trans-unit>
79104
<trans-unit id="e4b8188e898e654dae14fc6b18133958f8e56084" resname="translation.remove.success">
80105
<source>Removed '%languageCode%' translation from '%name%'.</source>
81106
<target state="new">Removed '%languageCode%' translation from '%name%'.</target>

src/bundle/Resources/translations/messages.en.xliff

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -366,28 +366,6 @@
366366
<target state="new">This email is connected with several accounts. Enter your login instead.</target>
367367
<note>key: ezplatform.forgot_user_password.login</note>
368368
</trans-unit>
369-
<trans-unit id="db6dd97ed4776bb0e9843554c48e3962327e8f50" resname="ezplatform.forgot_user_password.message">
370-
<source><![CDATA[Hi,
371-
<br /><br />
372-
We have received a request to reset the password for your Ibexa DXP account. Click “reset password” below to choose a new password:
373-
<br /><br />
374-
<a href="%reset_password%">Reset password</a>
375-
<br /><br />
376-
If you did not request a password reset, please ignore this email, and your password will remain the same.]]></source>
377-
<target state="new"><![CDATA[Hi,
378-
<br /><br />
379-
We have received a request to reset the password for your Ibexa DXP account. Click “reset password” below to choose a new password:
380-
<br /><br />
381-
<a href="%reset_password%">Reset password</a>
382-
<br /><br />
383-
If you did not request a password reset, please ignore this email, and your password will remain the same.]]></target>
384-
<note>key: ezplatform.forgot_user_password.message</note>
385-
</trans-unit>
386-
<trans-unit id="801ba7693e80ca58fbf2a9da2b735bf3f324fd27" resname="ezplatform.forgot_user_password.reset_your_password">
387-
<source>Reset your password</source>
388-
<target state="new">Reset your password</target>
389-
<note>key: ezplatform.forgot_user_password.reset_your_password</note>
390-
</trans-unit>
391369
<trans-unit id="264649149b7563144f9e2c462b13477dc7441302" resname="ezplatform.registration_confirmation.header">
392370
<source>Your account has been created</source>
393371
<target state="new">Your account has been created</target>
Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
1-
{%- block from -%}
2-
{%- endblock from -%}
1+
{% extends '@ibexadesign/ui/mail/base_mail_template.html.twig' %}
2+
3+
{% trans_default_domain 'ibexa_admin_ui' %}
34

45
{%- block subject -%}
5-
{{ 'ezplatform.forgot_user_password.reset_your_password'|trans|desc('Reset your password') }}
6+
{{ 'forgot_user_password.mail.reset_your_password'|trans|desc('Reset your password') }}
67
{%- endblock subject -%}
78

8-
{%- block body -%}
9-
<p>
10-
{{ 'ezplatform.forgot_user_password.message'|trans({ '%reset_password%': url('ibexa.user.reset_password', {'hashKey': hash_key}) })|raw
11-
|desc('Hi,
12-
<br /><br />
13-
We have received a request to reset the password for your Ibexa DXP account. Click “reset password” below to choose a new password:
14-
<br /><br />
15-
<a href="%reset_password%">Reset password</a>
16-
<br /><br />
17-
If you did not request a password reset, please ignore this email, and your password will remain the same.') }}
18-
</p>
19-
{%- endblock body -%}
9+
{%- block mail_message_title_content -%}
10+
{{ 'forgot_user_password.mail.message_title'|trans()|desc('Hello,') }}
11+
{%- endblock mail_message_title_content -%}
12+
13+
{%- block mail_message_content %}
14+
{{ 'forgot_user_password.mail.message'|trans()|desc('We have received a request to reset the password for your account. Click "reset password" below to choose a new password:') }}
15+
{%- endblock mail_message_content %}
16+
17+
{%- block mail_actions_content -%}
18+
{% include '@ibexadesign/ui/mail/components/action_btn.html.twig' with {
19+
url: url('ibexa.user.reset_password', { 'hashKey': hash_key }),
20+
label: 'forgot_user_password.mail.reset_password'|trans()|desc('Reset password')
21+
} only %}
22+
{%- endblock mail_actions_content -%}
23+
24+
{%- block mail_footer_content -%}
25+
{{ 'forgot_user_password.mail.message_footer'|trans()|desc('If you did not request a password reset, please ignore this email, and your password will remain the same.') }}
26+
{%- endblock mail_footer_content -%}
27+
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
2+
3+
{%- block subject -%}{%- endblock subject -%}
4+
{%- block from -%}{%- endblock from -%}
5+
6+
{% block DOCTYPE %}
7+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8+
{% endblock %}
9+
10+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
11+
{%- block head -%}
12+
<head>
13+
<!--[if mso]>
14+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
15+
<![endif]-->
16+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
17+
<meta name="color-scheme" content="light dark">
18+
<meta name="supported-color-schemes" content="light dark">
19+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
20+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300&display=swap" rel="stylesheet">
21+
<title>{%- block head_title -%}Ibexa DXP{%- endblock head_title -%}</title>
22+
</head>
23+
{%- endblock head -%}
24+
{%- block body -%}
25+
<body style="margin: 0; padding: 0; background: #ffffff">
26+
<table
27+
align="center"
28+
border="0"
29+
cellpadding="0"
30+
cellspacing="0"
31+
role="presentation"
32+
width="585"
33+
style="border: 1px solid #e0e0e8;"
34+
>
35+
<tbody>
36+
{%- block mail_header -%}
37+
{% set content %}
38+
{%- block mail_header_content -%}
39+
{% if header_img_path is defined %}
40+
<img
41+
style="width: 585px; height: 100px;"
42+
src="{{ header_img_path }}"
43+
alt="{%- block mail_header_alt_text -%}Ibexa DXP{%- endblock mail_header_alt_text -%}"
44+
/>
45+
{% else %}
46+
<h2 style="display: tabel-cell; padding: 32px 48px; margin: 0;">
47+
{% block mail_header_alternative_img_content %}Ibexa DXP{% endblock mail_header_alternative_img_content %}
48+
</h2>
49+
{% endif %}
50+
{%- endblock mail_header_content -%}
51+
{% endset %}
52+
53+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
54+
content,
55+
style: 'padding: 0;'
56+
} only %}
57+
{%- endblock mail_header -%}
58+
59+
{%- block mail_message_title -%}
60+
{% set content %}
61+
{%- block mail_message_title_content -%}{%- endblock mail_message_title_content -%}
62+
{% endset %}
63+
64+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
65+
content,
66+
style: not header_img_path is defined ? 'padding-top: 16px;'
67+
} only %}
68+
{%- endblock mail_message_title -%}
69+
70+
{%- block mail_message -%}
71+
{% set content %}
72+
{%- block mail_message_content -%}{%- endblock mail_message_content -%}
73+
{% endset %}
74+
75+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
76+
content,
77+
style: 'padding-bottom: 32px; line-height: 28px;'
78+
} only %}
79+
{%- endblock mail_message -%}
80+
81+
{%- block mail_actions -%}
82+
{% set content %}
83+
{%- block mail_actions_content -%}{%- endblock mail_actions_content -%}
84+
{% endset %}
85+
86+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
87+
content,
88+
style: 'padding-bottom: 48px;'
89+
} only %}
90+
{%- endblock mail_actions -%}
91+
92+
{%- block mail_footer -%}
93+
{% set line %}
94+
<div style="width: 100%; height: 1px; background: #e0e0e0;"></div>
95+
{% endset %}
96+
{% set content %}
97+
{%- block mail_footer_content -%}{%- endblock mail_footer_content -%}
98+
{% endset %}
99+
100+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with { content: line } only %}
101+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with { content } only %}
102+
{%- endblock mail_footer -%}
103+
</tbody>
104+
</table>
105+
</body>
106+
{%- endblock -%}
107+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% block mail_action_btn %}
2+
{% set base_style = '
3+
display: table-cell;
4+
padding: 15px 16px;
5+
font-family: \'Noto Sans\', sans-serif;
6+
font-size: 14px;
7+
color: #ffffff;
8+
text-align: center;
9+
text-decoration: none;
10+
vertical-align: middle;
11+
background: #AE1164;
12+
border-radius: 10px;'
13+
%}
14+
15+
<a style="{{ base_style ~ style|default('') }}" href="{{ url }}">{{ label }}</a>
16+
{% endblock mail_action_btn %}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% block mail_row %}
2+
{% set base_style = '
3+
width: 585px;
4+
padding: 0 48px 16px 48px;
5+
font-family: \'Noto Sans\', sans-serif;
6+
font-size: 14px;'
7+
%}
8+
9+
<tr>
10+
<td style="{{ base_style ~ style|default('') }}">{{ content|raw }}</td>
11+
</tr>
12+
{% endblock mail_row %}

0 commit comments

Comments
 (0)