login label updated when email authentication enabled (6669)

This commit is contained in:
Serghei Mihai 2015-03-12 11:21:11 +01:00
parent 6b9606a2c0
commit f41a12ba9a
2 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,8 @@ class LoginPasswordBackend(object):
is_post = request.method == 'POST' and self.submit_name in request.POST
data = request.POST if is_post else None
form = forms.AuthenticationForm(data=data)
if app_settings.ACCEPT_EMAIL_AUTHENTICATION:
form.fields['username'].label = _('Username or email')
is_secure = request.is_secure
context = {
'submit_name': self.submit_name,

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Authentic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-10 12:57+0100\n"
"POT-Creation-Date: 2015-03-12 11:15+0100\n"
"PO-Revision-Date: 2015-02-26 17:53+0100\n"
"Last-Translator: Mikaël Ates <mates@entrouvert.com>\n"
"Language-Team: None\n"
@ -1083,3 +1083,7 @@ msgstr "Déconnexion de tous vos services"
#: views.py:437
msgid "You have been logged out"
msgstr "Vous avez été déconnecté."
#: auth_frontends.py:16
msgid "Username or email"
msgstr "Identifiant ou courriel"