From 23ff8d36199c0cddb5bae4a5010cb71f861eeef8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 29 Dec 2015 09:59:46 +0100 Subject: Add custom email for 2FA Related #1490 --- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php | 4 ++-- .../Resources/views/themes/baggy/Config/index.html.twig | 8 ++++++++ .../Resources/views/themes/material/Config/index.html.twig | 6 ++++++ src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php | 4 ++-- 4 files changed, 18 insertions(+), 4 deletions(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index 84b78a89..3b3c1e97 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php @@ -25,7 +25,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $adminConfig->setTheme('material'); $adminConfig->setItemsPerPage(30); - $adminConfig->setLanguage('en_US'); + $adminConfig->setLanguage('en'); $manager->persist($adminConfig); @@ -34,7 +34,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface $bobConfig = new Config($this->getReference('bob-user')); $bobConfig->setTheme('default'); $bobConfig->setItemsPerPage(10); - $bobConfig->setLanguage('fr_FR'); + $bobConfig->setLanguage('fr'); $manager->persist($bobConfig); diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index cc797c63..d9850f7a 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -40,6 +40,10 @@ {{ form_start(form.rss) }} {{ form_errors(form.rss) }} +
+ {% trans %}RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader.{% endtrans %} +
+
@@ -101,6 +105,10 @@
{% if twofactor_auth %} +
+ {% trans %}Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion{% endtrans %} +
+
{{ form_label(form.user.twoFactorAuthentication) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig index d060311d..8743dc1d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig @@ -131,6 +131,12 @@
{% if twofactor_auth %} +
+
+ {% trans %}Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion{% endtrans %} +
+
+
{{ form_widget(form.user.twoFactorAuthentication) }} diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php index 7b32354f..89ca31e2 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php @@ -44,7 +44,7 @@ class ConfigControllerTest extends WallabagCoreTestCase $form = $crawler->filter('button[id=config_save]')->form(); $data = array( - 'config[theme]' => 0, + 'config[theme]' => 'baggy', 'config[items_per_page]' => '30', 'config[language]' => 'en', ); @@ -63,7 +63,7 @@ class ConfigControllerTest extends WallabagCoreTestCase { return array( array(array( - 'config[theme]' => 0, + 'config[theme]' => 'baggy', 'config[items_per_page]' => '', 'config[language]' => 'en', )), -- cgit v1.2.3