Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-9667: Updated emails template #1494

Draft
wants to merge 1 commit into
base: 4.6
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/bundle/Resources/public/img/mail/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/bundle/Resources/translations/ibexa_admin_ui.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,31 @@
<target state="new">Select language</target>
<note>key: edit_translation.list.title</note>
</trans-unit>
<trans-unit id="e7b58c781e23a49ce354cdb479f14d6f75ca6e4f" resname="forgot_user_password.mail.message">
<source>We have received a request to reset the password for your account. Click "reset password" below to choose a new password:</source>
<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>
<note>key: forgot_user_password.mail.message</note>
</trans-unit>
<trans-unit id="26ccb574b6cd1e49d40d32d9183db89065138be2" resname="forgot_user_password.mail.message_footer">
<source>If you did not request a password reset, please ignore this email, and your password will remain the same.</source>
<target state="new">If you did not request a password reset, please ignore this email, and your password will remain the same.</target>
<note>key: forgot_user_password.mail.message_footer</note>
</trans-unit>
<trans-unit id="a5ba92910b3dc61efc12c4f42cc869975be98723" resname="forgot_user_password.mail.message_title">
<source>Hello,</source>
<target state="new">Hello,</target>
<note>key: forgot_user_password.mail.message_title</note>
</trans-unit>
<trans-unit id="b7293d1f766a95b50cf3e076c5ef4cd623dc542c" resname="forgot_user_password.mail.reset_password">
<source>Reset password</source>
<target state="new">Reset password</target>
<note>key: forgot_user_password.mail.reset_password</note>
</trans-unit>
<trans-unit id="5fd68a8b7cdaa23771e0e970466b4432642df1d3" resname="forgot_user_password.mail.reset_your_password">
<source>Reset your password</source>
<target state="new">Reset your password</target>
<note>key: forgot_user_password.mail.reset_your_password</note>
</trans-unit>
<trans-unit id="e4b8188e898e654dae14fc6b18133958f8e56084" resname="translation.remove.success">
<source>Removed '%languageCode%' translation from '%name%'.</source>
<target state="new">Removed '%languageCode%' translation from '%name%'.</target>
Expand Down
22 changes: 0 additions & 22 deletions src/bundle/Resources/translations/messages.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -366,28 +366,6 @@
<target state="new">This email is connected with several accounts. Enter your login instead.</target>
<note>key: ezplatform.forgot_user_password.login</note>
</trans-unit>
<trans-unit id="db6dd97ed4776bb0e9843554c48e3962327e8f50" resname="ezplatform.forgot_user_password.message">
<source><![CDATA[Hi,
<br /><br />
We have received a request to reset the password for your Ibexa DXP account. Click “reset password” below to choose a new password:
<br /><br />
<a href="%reset_password%">Reset password</a>
<br /><br />
If you did not request a password reset, please ignore this email, and your password will remain the same.]]></source>
<target state="new"><![CDATA[Hi,
<br /><br />
We have received a request to reset the password for your Ibexa DXP account. Click “reset password” below to choose a new password:
<br /><br />
<a href="%reset_password%">Reset password</a>
<br /><br />
If you did not request a password reset, please ignore this email, and your password will remain the same.]]></target>
<note>key: ezplatform.forgot_user_password.message</note>
</trans-unit>
<trans-unit id="801ba7693e80ca58fbf2a9da2b735bf3f324fd27" resname="ezplatform.forgot_user_password.reset_your_password">
<source>Reset your password</source>
<target state="new">Reset your password</target>
<note>key: ezplatform.forgot_user_password.reset_your_password</note>
</trans-unit>
<trans-unit id="264649149b7563144f9e2c462b13477dc7441302" resname="ezplatform.registration_confirmation.header">
<source>Your account has been created</source>
<target state="new">Your account has been created</target>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
{%- block from -%}
{%- endblock from -%}
{% extends '@ibexadesign/ui/mail/base_mail_template.html.twig' %}

{% trans_default_domain 'ibexa_admin_ui' %}

{%- block subject -%}
{{ 'ezplatform.forgot_user_password.reset_your_password'|trans|desc('Reset your password') }}
{{ 'forgot_user_password.mail.reset_your_password'|trans|desc('Reset your password') }}
{%- endblock subject -%}

{%- block body -%}
<p>
{{ 'ezplatform.forgot_user_password.message'|trans({ '%reset_password%': url('ibexa.user.reset_password', {'hashKey': hash_key}) })|raw
|desc('Hi,
<br /><br />
We have received a request to reset the password for your Ibexa DXP account. Click “reset password” below to choose a new password:
<br /><br />
<a href="%reset_password%">Reset password</a>
<br /><br />
If you did not request a password reset, please ignore this email, and your password will remain the same.') }}
</p>
{%- endblock body -%}
{%- block mail_message_title_content -%}
{{ 'forgot_user_password.mail.message_title'|trans()|desc('Hello,') }}
{%- endblock mail_message_title_content -%}

{%- block mail_message_content %}
{{ '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:') }}
{%- endblock mail_message_content %}

{%- block mail_actions_content -%}
{% include '@ibexadesign/ui/mail/action_btn.html.twig' with {
url: url('ibexa.user.reset_password', {
'hashKey': hash_key
}),
label: 'forgot_user_password.mail.reset_password'|trans()|desc('Reset password')
} %}
{%- endblock mail_actions_content -%}

{%- block mail_footer_content -%}
{{ '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.') }}
{%- endblock mail_footer_content -%}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% set link_width = label|length * 10 %}
{% set btn_width = link_width + 32 %}

{% macro button_side_img(src, width_px = 16, height_px = 48) %}
{% if src %}
<td width="{{ width_px }}" height="{{ height_px }}" style="background: #AE1164;">
<img style="display: block; width: 16px; height: 48px" src="{{ src }}" >
</td>
{% endif %}
{% endmacro %}

<table
role="presentation"
cellspacing="0"
cellpadding="0"
border="0"
width="{{ btn_width }}"
>
<tr>
{{ _self.button_side_img(btn_primary_left_side|default(null)) }}
<td width="{{ link_width }}" height="48">
<a
style="
display: table-cell;
width: {{ link_width }}px;
height: 48px;
color: #ffffff;
text-align: center;
text-decoration: none;
vertical-align: middle;
background: #AE1164;
"
href="{{ url }}"
>
{{ label }}
</a>
</td>
{{ _self.button_side_img(btn_primary_right_side|default(null)) }}
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{% macro row(content, styles) %}
{% set styles = {
width: width|default('585px'),
'border': '1px solid red'
}|merge(styles|default({})) %}

<tr>
<td style="{%- for property_name, property_value in styles -%}{{property_name}}: {{property_value}}; {%- endfor -%}">{{ content|raw }}</td>
</tr>
{% endmacro %}

{%- block subject -%}{%- endblock subject -%}
{%- block from -%}{%- endblock from -%}

{% block DOCTYPE %}
<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{% endblock %}

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
{%- block head -%}
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light">
<meta name="supported-color-schemes" content="light">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300&display=swap" rel="stylesheet">
<title>{%- block head_title -%}Ibexa DXP{%- endblock head_title -%}</title>
</head>
{%- endblock head -%}
{%- block body -%}
<body style="background: #fffffe;">
<table
role="presentation"
cellspacing="0"
cellpadding="0"
border="0"
width="585"
style="font-family: 'Noto Sans', sans-serif; border-collapse: collapse; background: #ffff00;"
>
{%- block mail_header -%}
{% set content %}
{%- block mail_header_content -%}
{% if header_img_path is defined %}
{# <img
style="width: 585px; height: 100px;"
src="{{ header_img_path }}"
alt="{%- block mail_header_alt_text -%}Ibexa DXP{%- endblock mail_header_alt_text -%}"
/> #}
{% else %}
{% block mail_header_alternative_img_content %}
<h2>Ibexa DXP</h2>
{% endblock mail_header_alternative_img_content %}
{% endif %}
{%- endblock mail_header_content -%}
{% endset %}

{{ _self.row(content, { height: '100px'}) }}
{%- endblock mail_header -%}

{%- block mail_message_title -%}
{% set content %}
{%- block mail_message_title_content -%}{%- endblock mail_message_title_content -%}
{% endset %}

{{ _self.row(content) }}
{%- endblock mail_message_title -%}

{%- block mail_message -%}
{% set content %}
{%- block mail_message_content -%}{%- endblock mail_message_content -%}
{% endset %}

{{ _self.row(content, { 'padding-bottom': '32px', 'line-height': '28px' }) }}
{%- endblock mail_message -%}

{%- block mail_actions -%}
{% set content %}
{%- block mail_actions_content -%}{%- endblock mail_actions_content -%}
{% endset %}

{{ _self.row(content, { 'padding-bottom': '48px' }) }}
{%- endblock mail_actions -%}

{%- block mail_footer -%}
{% set line %}
<div style="width: 100%; height: 1px; background: #e0e0e0;"></div>
{% endset %}
{% set content %}
{%- block mail_footer_content -%}{%- endblock mail_footer_content -%}
{% endset %}

{{ _self.row(line) }}
{{ _self.row(content, { 'line-height': '20px' }) }}
{%- endblock mail_footer -%}
</table>
</body>
{%- endblock body -%}
</html>
Loading