mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2026-10-31 16:15:09 -07:00
add totp form autofocus attr
This commit is contained in:
1 parent
1bb7176643
commit
03afc74c1e
1 file changed
+4
@@ -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", )
|
||||
|
||||
Reference in new issue
Block a user