Add email to authentication

This commit is contained in:
cuom1999 2023-11-27 19:49:38 -06:00
parent 26f26a1722
commit 39b42a29a4
5 changed files with 241 additions and 221 deletions

View file

@ -418,7 +418,9 @@ class NewMessageForm(ModelForm):
class CustomAuthenticationForm(AuthenticationForm):
def __init__(self, *args, **kwargs):
super(CustomAuthenticationForm, self).__init__(*args, **kwargs)
self.fields["username"].widget.attrs.update({"placeholder": _("Username")})
self.fields["username"].widget.attrs.update(
{"placeholder": _("Username/Email")}
)
self.fields["password"].widget.attrs.update({"placeholder": _("Password")})
self.has_google_auth = self._has_social_auth("GOOGLE_OAUTH2")