Skip to content

Commit df545fd

Browse files
committed
Emails template
1 parent 74ba24d commit df545fd

File tree

7 files changed

+181
-37
lines changed

7 files changed

+181
-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: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{%- block subject -%}{%- endblock subject -%}
2+
{%- block from -%}{%- endblock from -%}
3+
4+
{% block DOCTYPE %}
5+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6+
{% endblock %}
7+
8+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
9+
{%- block head -%}
10+
<head>
11+
<!--[if mso]>
12+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
13+
<![endif]-->
14+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
15+
<meta name="color-scheme" content="light dark">
16+
<meta name="supported-color-schemes" content="light dark">
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
18+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300&display=swap" rel="stylesheet">
19+
<title>{%- block head_title -%}Ibexa DXP{%- endblock head_title -%}</title>
20+
</head>
21+
{%- endblock head -%}
22+
{%- block body -%}
23+
<body style="margin: 0; padding: 0; background: #ffffff">
24+
<table
25+
align="center"
26+
border="0"
27+
cellpadding="0"
28+
cellspacing="0"
29+
role="presentation"
30+
width="585"
31+
style="border: 1px solid #e0e0e8;"
32+
>
33+
<tbody>
34+
{%- block mail_header -%}
35+
{% set content %}
36+
{%- block mail_header_content -%}
37+
{% if header_img_path is defined %}
38+
<img
39+
style="width: 585px; height: 100px;"
40+
src="{{ header_img_path }}"
41+
alt="{%- block mail_header_alt_text -%}Ibexa DXP{%- endblock mail_header_alt_text -%}"
42+
/>
43+
{% else %}
44+
<h2 style="display: tabel-cell; padding: 32px 48px; margin: 0;">
45+
{% block mail_header_alternative_img_content %}Ibexa DXP{% endblock mail_header_alternative_img_content %}
46+
</h2>
47+
{% endif %}
48+
{%- endblock mail_header_content -%}
49+
{% endset %}
50+
51+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
52+
content,
53+
style: 'padding: 0;'
54+
} only %}
55+
{%- endblock mail_header -%}
56+
57+
{%- block mail_message_title -%}
58+
{% set content %}
59+
{%- block mail_message_title_content -%}{%- endblock mail_message_title_content -%}
60+
{% endset %}
61+
62+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
63+
content,
64+
style: not header_img_path is defined ? 'padding-top: 16px;'
65+
} only %}
66+
{%- endblock mail_message_title -%}
67+
68+
{%- block mail_message -%}
69+
{% set content %}
70+
{%- block mail_message_content -%}{%- endblock mail_message_content -%}
71+
{% endset %}
72+
73+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
74+
content,
75+
style: 'padding-bottom: 32px; line-height: 28px;'
76+
} only %}
77+
{%- endblock mail_message -%}
78+
79+
{%- block mail_actions -%}
80+
{% set content %}
81+
{%- block mail_actions_content -%}{%- endblock mail_actions_content -%}
82+
{% endset %}
83+
84+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with {
85+
content,
86+
style: 'padding-bottom: 48px;'
87+
} only %}
88+
{%- endblock mail_actions -%}
89+
90+
{%- block mail_footer -%}
91+
{% set line %}
92+
<div style="width: 100%; height: 1px; background: #e0e0e0;"></div>
93+
{% endset %}
94+
{% set content %}
95+
{%- block mail_footer_content -%}{%- endblock mail_footer_content -%}
96+
{% endset %}
97+
98+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with { content: line } only %}
99+
{% include '@ibexadesign/ui/mail/components/row.html.twig' with { content } only %}
100+
{%- endblock mail_footer -%}
101+
</tbody>
102+
</table>
103+
</body>
104+
{%- endblock -%}
105+
</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)