Better display and description

Confirmation message isn’t required since it is written in the delete description
This commit is contained in:
Jeremy Benoist 2016-10-08 19:39:50 +02:00
parent eed812afd0
commit 876d77a67d
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
14 changed files with 72 additions and 54 deletions

View file

@ -88,7 +88,11 @@ config:
name_label: 'Navn'
email_label: 'Emailadresse'
# twoFactorAuthentication_label: 'Two factor authentication'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Gammel adgangskode'
new_password_label: 'Ny adgangskode'
@ -487,6 +491,3 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Name'
email_label: 'E-Mail-Adresse'
twoFactorAuthentication_label: 'Zwei-Faktor-Authentifizierung'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Altes Kennwort'
new_password_label: 'Neues Kennwort'
@ -487,6 +491,3 @@ flashes:
notice:
client_created: 'Neuer Client erstellt.'
client_deleted: 'Client gelöscht'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Name'
email_label: 'Email'
twoFactorAuthentication_label: 'Two factor authentication'
delete_account: 'Delete my account'
delete:
title: Delete my account (danger zone !)
description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
confirm: Are you really sure? (it can't be UNDONE)
button: Delete my account
form_password:
old_password_label: 'Current password'
new_password_label: 'New password'
@ -486,9 +490,6 @@ flashes:
notice:
client_created: 'New client %name% created.'
client_deleted: 'Client %name% deleted'
account:
notice:
account_deleted: 'Account deleted'
user:
notice:
added: 'User "%username%" added'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Nombre'
email_label: 'Direccion e-mail'
twoFactorAuthentication_label: 'Autentificación de dos factores'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Contraseña actual'
new_password_label: 'Nueva contraseña'
@ -487,6 +491,3 @@ flashes:
notice:
client_created: 'Nuevo cliente creado.'
client_deleted: 'Cliente suprimido'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'نام'
email_label: 'نشانی ایمیل'
twoFactorAuthentication_label: 'تأیید ۲مرحله‌ای'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'رمز قدیمی'
new_password_label: 'رمز تازه'
@ -486,6 +490,3 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Nom'
email_label: 'Adresse e-mail'
twoFactorAuthentication_label: 'Double authentification'
delete_account: 'Supprimer mon compte'
delete:
title: Supprimer mon compte (attention danger !)
description: Si vous confirmez la suppression de votre compte, TOUS les articles, TOUS les tags, TOUTES les annotations et votre compte seront DÉFINITIVEMENT supprimé (c'est IRRÉVERSIBLE). Vous serez ensuite déconnecté.
confirm: Vous êtes vraiment sûr ? (c'est IRRÉVERSIBLE !)
button: 'Supprimer mon compte'
form_password:
old_password_label: 'Mot de passe actuel'
new_password_label: 'Nouveau mot de passe'
@ -487,6 +491,3 @@ flashes:
notice:
client_created: 'Nouveau client %name% créé'
client_deleted: 'Client %name% supprimé'
account:
notice:
account_deleted: 'Compte supprimé'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Nome'
email_label: 'E-mail'
twoFactorAuthentication_label: 'Two factor authentication'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Password corrente'
new_password_label: 'Nuova password'
@ -487,6 +491,3 @@ flashes:
notice:
client_created: 'Nuovo client creato.'
client_deleted: 'Client eliminato'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Nom'
email_label: 'Adreça de corrièl'
twoFactorAuthentication_label: 'Dobla autentificacion'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Senhal actual'
new_password_label: 'Senhal novèl'
@ -487,6 +491,3 @@ flashes:
notice:
client_created: 'Novèl client creat'
client_deleted: 'Client suprimit'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Nazwa'
email_label: 'Adres email'
twoFactorAuthentication_label: 'Autoryzacja dwuetapowa'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Stare hasło'
new_password_label: 'Nowe hasło'
@ -487,6 +491,3 @@ flashes:
notice:
client_created: 'Nowy klient utworzony.'
client_deleted: 'Klient usunięty'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'Nume'
email_label: 'E-mail'
# twoFactorAuthentication_label: 'Two factor authentication'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Parola veche'
new_password_label: 'Parola nouă'
@ -487,6 +491,3 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -88,7 +88,11 @@ config:
name_label: 'İsim'
email_label: 'E-posta'
twoFactorAuthentication_label: 'İki adımlı doğrulama'
# delete_account: 'Delete my account'
delete:
# title: Delete my account (danger zone !)
# description: If you remove your account, ALL your articles, ALL your tags, ALL your annotations and your account will be PERMANENTLY removed (it can't be UNDONE). You'll then be logged out.
# confirm: Are you really sure? (it can't be UNDONE)
# button: Delete my account
form_password:
old_password_label: 'Eski şifre'
new_password_label: 'Yeni şifre'
@ -486,6 +490,3 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
account:
notice:
# account_deleted: 'Account deleted'

View file

@ -148,11 +148,17 @@
{{ form_widget(form.user._token) }}
{{ form_widget(form.user.save) }}
{% if enabled_users > 1 %}
<a class='btn red delete-account' href='{{ path('delete_account') }}'>{{ 'config.form_user.delete_account' | trans }}</a>
{% endif %}
</form>
{% if enabled_users > 1 %}
<h2>{{ 'config.form_user.delete.title'|trans }}</h2>
<p>{{ 'config.form_user.delete.description'|trans }}</p>
<a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
{{ 'config.form_user.delete.button'|trans }}
</a>
{% endif %}
<h2>{{ 'config.tab_menu.password'|trans }}</h2>
{{ form_start(form.pwd) }}

View file

@ -172,10 +172,10 @@
<br /><hr /><br />
<div class="row">
<h5>{{ 'config.delete.title'|trans }}</h5>
<p>{{ 'config.delete.description'|trans }}</p>
<a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
{{ 'config.form_user.delete_account' | trans }}
<h5>{{ 'config.form_user.delete.title'|trans }}</h5>
<p>{{ 'config.form_user.delete.description'|trans }}</p>
<a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
{{ 'config.form_user.delete.button'|trans }}
</a>
</div>
{% endif %}

View file

@ -581,7 +581,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/config');
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertContains('config.form_user.delete_account', $body[0]);
$this->assertContains('config.form_user.delete.button', $body[0]);
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
@ -602,7 +602,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$crawler = $client->request('GET', '/config');
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertNotContains('config.form_user.delete_account', $body[0]);
$this->assertNotContains('config.form_user.delete.button', $body[0]);
$client->request('GET', '/account/delete');
$this->assertEquals(403, $client->getResponse()->getStatusCode());
@ -649,6 +649,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$em->flush();
$this->logInAs('wallace');
$loggedInUserId = $this->getLoggedInUserId();
// create entry to check after user deletion
// that this entry is also deleted
@ -685,7 +686,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$entries = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->findByUser($this->getLoggedInUserId());
->findByUser($loggedInUserId);
$this->assertEmpty($entries);
}