1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-26 18:21:02 +00:00

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)
This commit is contained in:
Jeremy Benoist 2016-01-20 17:43:10 +01:00
parent 5f736213af
commit abd454c456
7 changed files with 51 additions and 39 deletions

View file

@ -46,6 +46,13 @@ class AuthCodeMailer implements AuthCodeMailerInterface
*/
private $supportUrl;
/**
* Url for the wallabag instance.
*
* @var string
*/
private $wallabagUrl;
/**
* Initialize the auth code mailer with the SwiftMailer object.
*
@ -54,14 +61,16 @@ class AuthCodeMailer implements AuthCodeMailerInterface
* @param string $senderEmail
* @param string $senderName
* @param string $supportUrl
* @param string $wallabagUrl
*/
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl)
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl)
{
$this->mailer = $mailer;
$this->twig = $twig;
$this->senderEmail = $senderEmail;
$this->senderName = $senderName;
$this->supportUrl = $supportUrl;
$this->wallabagUrl = $wallabagUrl;
}
/**
@ -77,12 +86,13 @@ class AuthCodeMailer implements AuthCodeMailerInterface
$bodyHtml = $template->renderBlock('body_html', [
'user' => $user->getName(),
'code' => $user->getEmailAuthCode(),
'support' => $this->supportUrl,
'support_url' => $this->supportUrl,
'wallabag_url' => $this->wallabagUrl,
]);
$bodyText = $template->renderBlock('body_text', [
'user' => $user->getName(),
'code' => $user->getEmailAuthCode(),
'support' => $this->supportUrl,
'support_url' => $this->supportUrl,
]);
$message = new \Swift_Message();