mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-13 10:09:43 +00:00
Remove autofocus from form
This commit is contained in:
@@ -33,7 +33,12 @@ class ProfileRegistrationFormUniqueEmail(RegistrationFormUniqueEmail):
|
|||||||
return self.cleaned_data['initials']
|
return self.cleaned_data['initials']
|
||||||
|
|
||||||
|
|
||||||
# Login form
|
# Embedded Login form - remove the autofocus
|
||||||
|
class EmbeddedAuthenticationForm(AuthenticationForm):
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
self.fields['username'].widget.attrs.pop('autofocus', None)
|
||||||
|
|
||||||
class PasswordReset(PasswordResetForm):
|
class PasswordReset(PasswordResetForm):
|
||||||
captcha = ReCaptchaField(label='Captcha')
|
captcha = ReCaptchaField(label='Captcha')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user