forked from Github-Mirrors/canaille
UI improvement on forgotten password page. Fixes #43
This commit is contained in:
parent
58158b902d
commit
8d9a11a2e4
6 changed files with 65 additions and 49 deletions
|
@ -21,6 +21,7 @@ Added
|
|||
- Admin user page. :issue:`8`
|
||||
- Project logo. :pr:`29`
|
||||
- Admins can impersonate users. :issue:`39`
|
||||
- Forgotten page UX improvement. :pr:`43`
|
||||
- Admins can remove clients. :pr:`45`
|
||||
- Option `HIDE_INVALID_LOGIN` that can be unactivated to let the user know if
|
||||
the login he attempt to sign in with exists or not. :pr:`48`
|
||||
|
|
|
@ -33,7 +33,13 @@
|
|||
{{ form.hidden_tag() if form.hidden_tag }}
|
||||
{{ sui.render_field(form.login, icon="user") }}
|
||||
|
||||
<button type="submit" class="ui right floated primary button">{{ _("Send") }}</button>
|
||||
<button type="submit" class="ui right floated {% if request.method == "POST" and not form.errors %}primary {% endif %}button">
|
||||
{% if request.method == "POST" %}
|
||||
{{ _("Send again") }}
|
||||
{% else %}
|
||||
{{ _("Send") }}
|
||||
{% endif %}
|
||||
</button>
|
||||
<a type="button" class="ui right floated button" href="{{ url_for('canaille.account.login') }}">{{ _("Login page") }}</a>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Binary file not shown.
|
@ -2,14 +2,14 @@
|
|||
# Copyright (C) 2020 ORGANIZATION
|
||||
# This file is distributed under the same license as the PROJECT project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
|
||||
# Éloi Rivard <eloi@yaal.fr>, 2020.
|
||||
# Éloi Rivard <eloi@yaal.fr>, 2020-2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: contact@yaal.fr\n"
|
||||
"POT-Creation-Date: 2020-12-31 19:41+0100\n"
|
||||
"PO-Revision-Date: 2020-12-31 19:42+0100\n"
|
||||
"POT-Creation-Date: 2021-01-01 15:28+0100\n"
|
||||
"PO-Revision-Date: 2021-01-01 15:29+0100\n"
|
||||
"Last-Translator: Éloi Rivard <eloi@yaal.fr>\n"
|
||||
"Language: fr_FR\n"
|
||||
"Language-Team: French - France <equipe@yaal.fr>\n"
|
||||
|
@ -111,81 +111,81 @@ msgstr "Impossible de supprimer cet accès."
|
|||
msgid "The access has been revoked"
|
||||
msgstr "L'accès a été révoqué."
|
||||
|
||||
#: canaille/forms.py:12 canaille/forms.py:32
|
||||
#: canaille/forms.py:12 canaille/forms.py:37
|
||||
msgid "Login"
|
||||
msgstr "Identifiant"
|
||||
|
||||
#: canaille/forms.py:15 canaille/forms.py:35 canaille/forms.py:83
|
||||
#: canaille/forms.py:15 canaille/forms.py:40 canaille/forms.py:96
|
||||
msgid "jane@doe.com"
|
||||
msgstr "martin@dupont.fr"
|
||||
|
||||
#: canaille/forms.py:22 canaille/forms.py:44 canaille/forms.py:93
|
||||
#: canaille/forms.py:22 canaille/forms.py:57 canaille/forms.py:106
|
||||
msgid "Password"
|
||||
msgstr "Mot de passe"
|
||||
|
||||
#: canaille/forms.py:28
|
||||
#: canaille/forms.py:31 canaille/forms.py:51
|
||||
msgid "The login '{login}' does not exist"
|
||||
msgstr "L'identifiant '{login}' n'existe pas"
|
||||
|
||||
#: canaille/forms.py:47 canaille/forms.py:97
|
||||
#: canaille/forms.py:60 canaille/forms.py:110
|
||||
msgid "Password confirmation"
|
||||
msgstr "Confirmation du mot de passe"
|
||||
|
||||
#: canaille/forms.py:50 canaille/forms.py:100
|
||||
#: canaille/forms.py:63 canaille/forms.py:113
|
||||
msgid "Password and confirmation do not match."
|
||||
msgstr "Le mot de passe et sa confirmation ne correspondent pas."
|
||||
|
||||
#: canaille/forms.py:58
|
||||
#: canaille/forms.py:71
|
||||
msgid "Username"
|
||||
msgstr "Identifiant"
|
||||
|
||||
#: canaille/forms.py:59
|
||||
#: canaille/forms.py:72
|
||||
msgid "jdoe"
|
||||
msgstr "mdupont"
|
||||
|
||||
#: canaille/admin/clients.py:23 canaille/forms.py:62
|
||||
#: canaille/admin/clients.py:23 canaille/forms.py:75
|
||||
#: canaille/templates/admin/client_list.html:25
|
||||
#: canaille/templates/users.html:22
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: canaille/forms.py:64
|
||||
#: canaille/forms.py:77
|
||||
msgid "Given name"
|
||||
msgstr "Prénom"
|
||||
|
||||
#: canaille/forms.py:66
|
||||
#: canaille/forms.py:79
|
||||
msgid "John"
|
||||
msgstr "Martin"
|
||||
|
||||
#: canaille/forms.py:72
|
||||
#: canaille/forms.py:85
|
||||
msgid "Family Name"
|
||||
msgstr "Nom de famille"
|
||||
|
||||
#: canaille/forms.py:74
|
||||
#: canaille/forms.py:87
|
||||
msgid "Doe"
|
||||
msgstr "Dupont"
|
||||
|
||||
#: canaille/forms.py:80
|
||||
#: canaille/forms.py:93
|
||||
msgid "Email address"
|
||||
msgstr "Courriel"
|
||||
|
||||
#: canaille/forms.py:89 canaille/templates/users.html:24
|
||||
#: canaille/forms.py:102 canaille/templates/users.html:24
|
||||
msgid "Phone number"
|
||||
msgstr "Numéro de téléphone"
|
||||
|
||||
#: canaille/forms.py:89
|
||||
#: canaille/forms.py:102
|
||||
msgid "555-000-555"
|
||||
msgstr "06 01 02 03 04"
|
||||
|
||||
#: canaille/forms.py:91
|
||||
#: canaille/forms.py:104
|
||||
msgid "Photo"
|
||||
msgstr "Photo"
|
||||
|
||||
#: canaille/forms.py:105
|
||||
#: canaille/forms.py:118
|
||||
msgid "Number"
|
||||
msgstr "Numéro"
|
||||
|
||||
#: canaille/forms.py:107
|
||||
#: canaille/forms.py:120
|
||||
msgid "1234"
|
||||
msgstr "1234"
|
||||
|
||||
|
@ -440,7 +440,7 @@ msgid "Send the initialization email"
|
|||
msgstr "Envoyer le courriel d'initialisation"
|
||||
|
||||
#: canaille/templates/firstlogin.html:36
|
||||
#: canaille/templates/forgotten-password.html:37
|
||||
#: canaille/templates/forgotten-password.html:43
|
||||
msgid "Login page"
|
||||
msgstr "Page de connexion"
|
||||
|
||||
|
@ -466,7 +466,11 @@ msgstr ""
|
|||
" vous permettra de ré-initialiser votre mot de passe.\n"
|
||||
" "
|
||||
|
||||
#: canaille/templates/forgotten-password.html:36
|
||||
#: canaille/templates/forgotten-password.html:38
|
||||
msgid "Send again"
|
||||
msgstr "Envoyer à nouveau"
|
||||
|
||||
#: canaille/templates/forgotten-password.html:40
|
||||
#: canaille/templates/profile.html:92
|
||||
msgid "Send"
|
||||
msgstr "Envoyer"
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
# Translations template for PROJECT.
|
||||
# Copyright (C) 2020 ORGANIZATION
|
||||
# Copyright (C) 2021 ORGANIZATION
|
||||
# This file is distributed under the same license as the PROJECT project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2020-12-31 19:41+0100\n"
|
||||
"POT-Creation-Date: 2021-01-01 15:28+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -104,81 +104,81 @@ msgstr ""
|
|||
msgid "The access has been revoked"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:12 canaille/forms.py:32
|
||||
#: canaille/forms.py:12 canaille/forms.py:37
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:15 canaille/forms.py:35 canaille/forms.py:83
|
||||
#: canaille/forms.py:15 canaille/forms.py:40 canaille/forms.py:96
|
||||
msgid "jane@doe.com"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:22 canaille/forms.py:44 canaille/forms.py:93
|
||||
#: canaille/forms.py:22 canaille/forms.py:57 canaille/forms.py:106
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:28
|
||||
#: canaille/forms.py:31 canaille/forms.py:51
|
||||
msgid "The login '{login}' does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:47 canaille/forms.py:97
|
||||
#: canaille/forms.py:60 canaille/forms.py:110
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:50 canaille/forms.py:100
|
||||
#: canaille/forms.py:63 canaille/forms.py:113
|
||||
msgid "Password and confirmation do not match."
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:58
|
||||
#: canaille/forms.py:71
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:59
|
||||
#: canaille/forms.py:72
|
||||
msgid "jdoe"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/admin/clients.py:23 canaille/forms.py:62
|
||||
#: canaille/admin/clients.py:23 canaille/forms.py:75
|
||||
#: canaille/templates/admin/client_list.html:25
|
||||
#: canaille/templates/users.html:22
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:64
|
||||
#: canaille/forms.py:77
|
||||
msgid "Given name"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:66
|
||||
#: canaille/forms.py:79
|
||||
msgid "John"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:72
|
||||
#: canaille/forms.py:85
|
||||
msgid "Family Name"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:74
|
||||
#: canaille/forms.py:87
|
||||
msgid "Doe"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:80
|
||||
#: canaille/forms.py:93
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:89 canaille/templates/users.html:24
|
||||
#: canaille/forms.py:102 canaille/templates/users.html:24
|
||||
msgid "Phone number"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:89
|
||||
#: canaille/forms.py:102
|
||||
msgid "555-000-555"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:91
|
||||
#: canaille/forms.py:104
|
||||
msgid "Photo"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:105
|
||||
#: canaille/forms.py:118
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/forms.py:107
|
||||
#: canaille/forms.py:120
|
||||
msgid "1234"
|
||||
msgstr ""
|
||||
|
||||
|
@ -423,7 +423,7 @@ msgid "Send the initialization email"
|
|||
msgstr ""
|
||||
|
||||
#: canaille/templates/firstlogin.html:36
|
||||
#: canaille/templates/forgotten-password.html:37
|
||||
#: canaille/templates/forgotten-password.html:43
|
||||
msgid "Login page"
|
||||
msgstr ""
|
||||
|
||||
|
@ -443,7 +443,11 @@ msgid ""
|
|||
" "
|
||||
msgstr ""
|
||||
|
||||
#: canaille/templates/forgotten-password.html:36
|
||||
#: canaille/templates/forgotten-password.html:38
|
||||
msgid "Send again"
|
||||
msgstr ""
|
||||
|
||||
#: canaille/templates/forgotten-password.html:40
|
||||
#: canaille/templates/profile.html:92
|
||||
msgid "Send"
|
||||
msgstr ""
|
||||
|
|
|
@ -8,6 +8,7 @@ def test_password_forgotten(SMTP, testclient, slapd_connection, user):
|
|||
res.form["login"] = "user"
|
||||
res = res.form.submit(status=200)
|
||||
assert "A password reset link has been sent at your email address." in res.text
|
||||
assert "Send again" in res.text
|
||||
|
||||
SMTP.assert_called_once_with(host="localhost", port=25)
|
||||
|
||||
|
|
Loading…
Reference in a new issue