Add custom email for 2FA

Related #1490
This commit is contained in:
Jeremy Benoist
2015-12-29 09:59:46 +01:00
parent c997cfcc9c
commit 23ff8d3619
16 changed files with 266 additions and 5 deletions

View File

@ -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);

View File

@ -40,6 +40,10 @@
{{ form_start(form.rss) }}
{{ form_errors(form.rss) }}
<div class="row">
{% trans %}RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader.{% endtrans %}
</div>
<fieldset class="w500p inline">
<div class="row">
<label>Rss token</label>
@ -101,6 +105,10 @@
</fieldset>
{% if twofactor_auth %}
<div class="row">
{% trans %}Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion{% endtrans %}
</div>
<fieldset class="w500p inline">
<div class="row">
{{ form_label(form.user.twoFactorAuthentication) }}

View File

@ -131,6 +131,12 @@
</div>
{% if twofactor_auth %}
<div class="row">
<div class="input-field col s12">
{% trans %}Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion{% endtrans %}
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ form_widget(form.user.twoFactorAuthentication) }}

View File

@ -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',
)),