]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Better display and description
authorJeremy Benoist <jeremy.benoist@gmail.com>
Sat, 8 Oct 2016 17:39:50 +0000 (19:39 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Sat, 8 Oct 2016 18:25:42 +0000 (20:25 +0200)
Confirmation message isn’t required since it is written in the delete description

14 files changed:
src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php

index 4c412592d94783b4f994a3fff615859fdf99d34a..2de5d7bd4ecc323609c25c699fa7a24d604efe74 100644 (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'
index 99b79bce8f7d3fac0f23e8dfb016f4b88c52d3f2..515d43a01e97b8ccb6ce1ac4f530f63cba13b250 100644 (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'
index 94144ed485c32f552ccc4c1a9d241b9f12f4cdb2..43f5a95088e0fd5a4d14e87c337f2e79f96539ea 100644 (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'
index a5e8d72243e9f4682a1175d9647e83a3aaf6c17f..adeab2b081552dc8b911734cadb9cd5608808df1 100644 (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'
index 4b8d9689a9a7bc62776429caa2f446dcc6b840dd..0751752b762b790374f324831b4b58b0bbfe8ffb 100644 (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'
index 67cd5f0e4e717a3e6fab41d2706991867fffa31a..1c32a77c8561aba53e572f8ad443d6a272ab4bc1 100644 (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é'
index 55d961f3a47623c7228e1ac2e7e25b274e8c6767..f662bd55eb8b4812c730eb5ad504267c9eeed357 100644 (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'
index 5c6b424765cae5b0741a7ad6f4df17a9fcf4a7fe..9e314f73021e0305779cda5c3ae9fe1098070694 100644 (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'
index be96642729f002b076a9992ba9a4b9369bf83304..9877d59a083b4a7a4232cbb453c08633a4975343 100644 (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'
index 1e52cf0b23aac86e08133e673ee7e101f4a1bfc0..83246ed3f5bb4553e01a46d2e98d1864f535734a 100644 (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'
index ef5477e13a27401d8238df6662a5f9dff52e885a..24dd6ff8c09ee7ba7576a92f33834e3b89d4e9dc 100644 (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'
index b10db473b92666708e7cad0fd16ade1e9e42b3b2..54508b6dcb225f799876d1e418d224fa71ca39f6 100644 (file)
 
         {{ 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) }}
index 25d259b865fc74960f26284b1df0405cdf25f2cd..8434508d0552e3b5c9b3217983a928ca8e2e0b53 100644 (file)
                             <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 %}
index 7929b63d403eb4a8ccf55dfc2e57bde941b96b7e..5faa0130bece27ee59f15b3b0743290f682272cb 100644 (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);
     }