mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2024-11-24 10:21:31 -08:00
add totp form autofocus attr
This commit is contained in:
parent
1bb7176643
commit
03afc74c1e
@ -8,6 +8,10 @@ class EnableTotpForm(forms.ModelForm):
|
||||
|
||||
totp_code = forms.CharField(max_length=6)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['totp_code'].widget.attrs.update({'autofocus': 'autofocus'})
|
||||
|
||||
class Meta:
|
||||
model = Account
|
||||
fields = ("totp_code", )
|
||||
|
Loading…
Reference in New Issue
Block a user