Skip to content

Commit 13d7371

Browse files
committed
Emails template
1 parent b6c6fd3 commit 13d7371

File tree

8 files changed

+166
-37
lines changed

8 files changed

+166
-37
lines changed
Loading
Loading
33.8 KB
Loading

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

+25
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,31 @@
5656
<target state="new">Select language</target>
5757
<note>key: edit_translation.list.title</note>
5858
</trans-unit>
59+
<trans-unit id="e7b58c781e23a49ce354cdb479f14d6f75ca6e4f" resname="forgot_user_password.mail.message">
60+
<source>We have received a request to reset the password for your account. Click "reset password" below to choose a new password:</source>
61+
<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>
62+
<note>key: forgot_user_password.mail.message</note>
63+
</trans-unit>
64+
<trans-unit id="26ccb574b6cd1e49d40d32d9183db89065138be2" resname="forgot_user_password.mail.message_footer">
65+
<source>If you did not request a password reset, please ignore this email, and your password will remain the same.</source>
66+
<target state="new">If you did not request a password reset, please ignore this email, and your password will remain the same.</target>
67+
<note>key: forgot_user_password.mail.message_footer</note>
68+
</trans-unit>
69+
<trans-unit id="a5ba92910b3dc61efc12c4f42cc869975be98723" resname="forgot_user_password.mail.message_title">
70+
<source>Hello,</source>
71+
<target state="new">Hello,</target>
72+
<note>key: forgot_user_password.mail.message_title</note>
73+
</trans-unit>
74+
<trans-unit id="b7293d1f766a95b50cf3e076c5ef4cd623dc542c" resname="forgot_user_password.mail.reset_password">
75+
<source>Reset password</source>
76+
<target state="new">Reset password</target>
77+
<note>key: forgot_user_password.mail.reset_password</note>
78+
</trans-unit>
79+
<trans-unit id="5fd68a8b7cdaa23771e0e970466b4432642df1d3" resname="forgot_user_password.mail.reset_your_password">
80+
<source>Reset your password</source>
81+
<target state="new">Reset your password</target>
82+
<note>key: forgot_user_password.mail.reset_your_password</note>
83+
</trans-unit>
5984
<trans-unit id="e4b8188e898e654dae14fc6b18133958f8e56084" resname="translation.remove.success">
6085
<source>Removed '%languageCode%' translation from '%name%'.</source>
6186
<target state="new">Removed '%languageCode%' translation from '%name%'.</target>

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

-22
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>
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
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 message_title -%}
10+
{{ 'forgot_user_password.mail.message_title'|trans()|desc('Hello,') }}
11+
{%- endblock message_title -%}
12+
13+
{%- block message %}
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 message %}
16+
17+
{%- block message_actions -%}
18+
{% include '@ibexadesign/ui/mail/action_btn.html.twig' with {
19+
url: url('ibexa.user.reset_password', {
20+
'hashKey': hash_key
21+
}),
22+
label: 'forgot_user_password.mail.reset_password'|trans()|desc('Reset password')
23+
} %}
24+
{%- endblock message_actions -%}
25+
26+
{%- block message_footer -%}
27+
{{ '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.') }}
28+
{%- endblock message_footer -%}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{% set link_width = label|length * 10 %}
2+
{% set btn_width = link_width + 32 %}
3+
4+
{% macro button_side_img(src, width_px = 16, height_px = 48) %}
5+
{% if src %}
6+
<td width="{{ width_px }}" height="{{ height_px }}" style="background: #AE1164;">
7+
<img style="display: block; width: 16px; height: 48px" src="{{ src }}" >
8+
</td>
9+
{% endif %}
10+
{% endmacro %}
11+
12+
<table
13+
role="presentation"
14+
cellspacing="0"
15+
cellpadding="0"
16+
border="0"
17+
width="{{ btn_width }}"
18+
>
19+
<tr>
20+
{{ _self.button_side_img(btn_primary_left_side|default(null)) }}
21+
<td width="{{ link_width }}" height="48">
22+
<a
23+
style="
24+
display: table-cell;
25+
width: {{ link_width }}px;
26+
height: 48px;
27+
color: #ffffff;
28+
text-align: center;
29+
text-decoration: none;
30+
vertical-align: middle;
31+
background: #AE1164;
32+
"
33+
href="{{ url }}"
34+
>
35+
{{ label }}
36+
</a>
37+
</td>
38+
{{ _self.button_side_img(btn_primary_right_side|default(null)) }}
39+
</tr>
40+
</table>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{%- block subject -%}{%- endblock subject -%}
2+
{%- block from -%}{%- endblock from -%}
3+
4+
{% block DOCTYPE %}
5+
<!DOCTYPE htmlPUBLIC "-//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+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
12+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
13+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
14+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300&display=swap" rel="stylesheet">
15+
<title>{%- block head_title -%}Ibexa DXP{%- endblock head_title -%}</title>
16+
</head>
17+
{%- endblock head -%}
18+
{%- block body -%}
19+
<body>
20+
<table
21+
role="presentation"
22+
cellspacing="0"
23+
cellpadding="0"
24+
border="0"
25+
width="585"
26+
style="font-family: 'Noto Sans', sans-serif; border-collapse: collapse; background: #fff;"
27+
>
28+
{%- block message_header_wrapper -%}
29+
<tr>
30+
<td style="
31+
width: 585px;
32+
height: 100px;
33+
{{ header_path is defined ? 'padding: 0 0 14px 0' : 'padding: 0 0 14px 48px;' }}
34+
">
35+
{%- block message_header -%}
36+
{% if header_path is defined %}
37+
<img style="width: 585px; height: 100px;" src="{{ header_path }}" alt="{%- block message_header_alt_text -%}Ibexa DXP{%- endblock message_header_alt_text -%}">
38+
{% else %}
39+
{% block no_header_img_content %}<h2>Ibexa DXP</h2>{% endblock %}
40+
{% endif %}
41+
{%- endblock message_header -%}
42+
</td>
43+
</tr>
44+
{%- endblock message_header_wrapper -%}
45+
46+
{%- block message_title_wrapper -%}
47+
<tr>
48+
<td style="padding: 0 48px 16px 48px">{%- block message_title -%}{%- endblock message_title -%}</td>
49+
</tr>
50+
{%- endblock message_title_wrapper -%}
51+
52+
{%- block message_wrapper -%}
53+
<tr>
54+
<td style="padding: 0 48px 24px 48px">{%- block message -%}{%- endblock message -%}</td>
55+
</tr>
56+
{%- endblock message_wrapper -%}
57+
58+
{%- block message_actions_wrapper -%}
59+
<tr>
60+
<td style="padding: 0 48px 48px 48px">{%- block message_actions -%}{%- endblock message_actions -%}</td>
61+
</tr>
62+
{%- endblock message_actions_wrapper -%}
63+
64+
{%- block message_footer_wrapper -%}
65+
<tr>
66+
<td style="padding: 0 48px 0 48px">
67+
<div style="width: 100%; height: 1px; background: #e0e0e0;"></div>
68+
</td>
69+
</tr>
70+
<tr>
71+
<td style="padding: 14px 48px 0 48px">{%- block message_footer -%}{%- endblock message_footer -%}</td>
72+
</tr>
73+
{%- endblock message_footer_wrapper -%}
74+
</table>
75+
</body>
76+
{%- endblock body -%}
77+
</html>

0 commit comments

Comments
 (0)