aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Resources
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-01-20 17:43:10 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-21 11:03:27 +0100
commitabd454c45633e335d9d63bcd250e760b968f8138 (patch)
treea616f79e642b9683b3c7b597ed9c4072c0af5cdf /src/Wallabag/UserBundle/Resources
parent5f736213af209b0457e4e9d62f06fd5f46652f5f (diff)
downloadwallabag-abd454c45633e335d9d63bcd250e760b968f8138.tar.gz
wallabag-abd454c45633e335d9d63bcd250e760b968f8138.tar.zst
wallabag-abd454c45633e335d9d63bcd250e760b968f8138.zip
Update HTML 2FA template
Split paragraph in translation Inject wallabag_url for image in HTML template Remove username & password from config_dev.yml (null are already the default value)
Diffstat (limited to 'src/Wallabag/UserBundle/Resources')
-rw-r--r--src/Wallabag/UserBundle/Resources/config/services.yml1
-rw-r--r--src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml10
-rw-r--r--src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml10
-rw-r--r--src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig35
4 files changed, 29 insertions, 27 deletions
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml
index aa2fd8b9..93e04d59 100644
--- a/src/Wallabag/UserBundle/Resources/config/services.yml
+++ b/src/Wallabag/UserBundle/Resources/config/services.yml
@@ -7,3 +7,4 @@ services:
7 - "%scheb_two_factor.email.sender_email%" 7 - "%scheb_two_factor.email.sender_email%"
8 - "%scheb_two_factor.email.sender_name%" 8 - "%scheb_two_factor.email.sender_name%"
9 - "%wallabag_support_url%" 9 - "%wallabag_support_url%"
10 - "%wallabag_url%"
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml
index 7298bb28..4da6075f 100644
--- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml
+++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.en.yml
@@ -1,9 +1,7 @@
1# Two factor mail 1# Two factor mail
2auth_code.mailer.subject: 'Wallabag authentication Code' 2auth_code.mailer.subject: 'Wallabag authentication Code'
3auth_code.mailer.body.hello: "Hi %user%," 3auth_code.mailer.body.hello: "Hi %user%,"
4auth_code.mailer.body.content: | 4auth_code.mailer.body.first_para: "Since you enable two factor authentication on your wallabag account and you just logged in from a new device (computer, phone, etc.), we send you a code to validate your connection."
5 Since you enable two factor authentication on your wallabag account and you just logged in from a new device (computer, phone, etc.), we send you a code to validate your connection. 5auth_code.mailer.body.second_para: "Here is the code:"
6 Here is the code: %code% 6auth_code.mailer.body.support: "Please don't hesitate to contact us if you have any problems:"
7auth_code.mailer.body.signature: | 7auth_code.mailer.body.signature: "The wallabag team"
8 Please don't hesitate to contact us if you have any problems: %support%
9 The wallabag team
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml
index 0c492d04..b4448d3a 100644
--- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml
+++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml
@@ -1,9 +1,7 @@
1# Two factor mail 1# Two factor mail
2auth_code.mailer.subject: "Code d'authentification wallabag" 2auth_code.mailer.subject: "Code d'authentification wallabag"
3auth_code.mailer.body.hello: "Bonjour %user%," 3auth_code.mailer.body.hello: "Bonjour %user%,"
4auth_code.mailer.body.content: | 4auth_code.mailer.body.first_para: "Comme vous avez activé la double authentification sur votre compte wallabag et que vous venez de vous connecter depuis un nouvel appareil (ordinateur, téléphone, etc.), nous vous envoyons un code pour valider votre connexion."
5 Comme vous avez activé la double authentification sur votre compte wallabag et que vous venez de vous connecter depuis un nouvel appareil (ordinateur, téléphone, etc.), nous vous envoyons un code pour valider votre connexion. 5auth_code.mailer.body.second_para: "Voici le code à renseigner :"
6 Voici le code à renseigner: %code% 6auth_code.mailer.body.support: "Si vous avez un problème de connexion, n'hésitez pas à contacter le support :"
7auth_code.mailer.body.signature: | 7auth_code.mailer.body.signature: "L'équipe wallabag"
8 Si vous avez un problème de connexion, n'hésitez pas à contacter le support: %support%
9 L'équipe wallabag
diff --git a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig
index 849cd136..69d23160 100644
--- a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig
+++ b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig
@@ -2,6 +2,17 @@
2{{ "auth_code.mailer.subject"|trans({}, 'wallabag_user') }} 2{{ "auth_code.mailer.subject"|trans({}, 'wallabag_user') }}
3{% endblock %} 3{% endblock %}
4 4
5{% block body_text %}
6{{ "auth_code.mailer.body.hello"|trans({'%user%': user}, 'wallabag_user') }}
7
8{{ "auth_code.mailer.body.first_para"|trans({}, 'wallabag_user') }}
9{{ "auth_code.mailer.body.second_para"|trans({}, 'wallabag_user') }} {{ code }}
10
11{{ "auth_code.mailer.body.support"|trans({}, 'wallabag_user') }} {{ support_url }}
12
13{{ "auth_code.mailer.body.signature"|trans({}, 'wallabag_user') }}
14{% endblock %}
15
5{% block body_html %} 16{% block body_html %}
6<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 17<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
7 18
@@ -63,10 +74,10 @@
63 74
64 <table cellpadding="0" cellspacing="0" border="0" align="center" id="card"> 75 <table cellpadding="0" cellspacing="0" border="0" align="center" id="card">
65 <tr> 76 <tr>
66 <td style="padding: 20px;" width="96px" valign="top"><img class="image_fix" src="{ wallabag_url }/themes/material/img/logo-other_themes.png" alt="logo" title="{ wallabag_url }" style="width: 96px; height: 96px;" /></td> 77 <td style="padding: 20px;" width="96px" valign="top"><img class="image_fix" src="{{ wallabag_url }}/themes/material/img/logo-other_themes.png" alt="logo" title="{{ wallabag_url }}" style="width: 96px; height: 96px;" /></td>
67 <td style="padding: 20px; padding-left: 0;" valign="top" id="cell_desc"> 78 <td style="padding: 20px; padding-left: 0;" valign="top" id="cell_desc">
68 <h1>Wallabag</h1> 79 <h1>wallabag</h1>
69 <h5>{% trans %}on{% endtrans %} { wallabag_url }</h5> 80 <h5>{% trans %}on{% endtrans %} {{ wallabag_url }}</h5>
70 </td> 81 </td>
71 </tr> 82 </tr>
72 <tr><td colspan="2" style="padding: 0;"><div style="height: 0; border-top: 1px solid #c5c5c5;">&nbsp;</div></td></tr> 83 <tr><td colspan="2" style="padding: 0;"><div style="height: 0; border-top: 1px solid #c5c5c5;">&nbsp;</div></td></tr>
@@ -75,10 +86,11 @@
75 86
76 <p><b>{{ "auth_code.mailer.body.hello"|trans({'%user%': user}, 'wallabag_user') }}</b></p> 87 <p><b>{{ "auth_code.mailer.body.hello"|trans({'%user%': user}, 'wallabag_user') }}</b></p>
77 88
78 <p>{{ "auth_code.mailer.body.content"|trans({'%code%': code}, 'wallabag_user') }}</p> 89 <p>{{ "auth_code.mailer.body.first_para"|trans({}, 'wallabag_user') }}</p>
79 90 <p>{{ "auth_code.mailer.body.second_para"|trans({}, 'wallabag_user') }} <b>{{ code }}</b></p>
80 <p>{{ "auth_code.mailer.body.signature"|trans({'%support%': support}, 'wallabag_user') }}</p>
81 91
92 <p>{{ "auth_code.mailer.body.support"|trans({}, 'wallabag_user') }} <a href="{{ support_url }}">{{ support_url }}</a></p>
93 <p>{{ "auth_code.mailer.body.signature"|trans({}, 'wallabag_user') }}</p>
82 </td> 94 </td>
83 </tr> 95 </tr>
84 <tr><td colspan="2" style="padding: 0;"><div style="height: 0; border-top: 1px solid #c5c5c5;">&nbsp;</div></td></tr> 96 <tr><td colspan="2" style="padding: 0;"><div style="height: 0; border-top: 1px solid #c5c5c5;">&nbsp;</div></td></tr>
@@ -87,8 +99,8 @@
87 99
88 <table cellpadding="0" cellspacing="0" border="0" width="100%"> 100 <table cellpadding="0" cellspacing="0" border="0" width="100%">
89 <tr> 101 <tr>
90 <td valign="top" style="padding: 20px; text-align: center"><a href="{ wallabag_url }">{ wallabag_url }</a></td> 102 <td valign="top" style="padding: 20px; text-align: center"><a href="{{ wallabag_url }}">{{ wallabag_url }}</a></td>
91 <td valign="top" style="padding: 20px; text-align: center">Powered by <a href="https://www.wallabag.org/">Wallabag</a></td> 103 <td valign="top" style="padding: 20px; text-align: center">Powered by <a href="https://www.wallabag.org/">wallabag</a></td>
92 </tr> 104 </tr>
93 </table> 105 </table>
94 106
@@ -103,10 +115,3 @@
103</body> 115</body>
104</html> 116</html>
105{% endblock %} 117{% endblock %}
106
107{% block body_text %}
108{{ "auth_code.mailer.body.hello"|trans({'%user%': user}, 'wallabag_user') }}
109
110{{ "auth_code.mailer.body.content"|trans({'%code%': code}, 'wallabag_user') }}
111{{ "auth_code.mailer.body.signature"|trans({'%support%': support}, 'wallabag_user') }}
112{% endblock %}