From 0a6f555c239c97eff4ce0a95c0dea667603ac00e Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Mon, 7 Oct 2019 16:57:54 +0200 Subject: [PATCH] otp(minor): disable autocomplete for code input --- passbook/factors/otp/forms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/passbook/factors/otp/forms.py b/passbook/factors/otp/forms.py index 16a37908a..fdc129d28 100644 --- a/passbook/factors/otp/forms.py +++ b/passbook/factors/otp/forms.py @@ -34,8 +34,10 @@ class OTPVerifyForm(forms.Form): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # This is a little helper so the field is focused by default - # TODO: Tell browser to not suggest any values - self.fields['code'].widget.attrs.update({'autofocus': 'autofocus'}) + self.fields['code'].widget.attrs.update({ + 'autofocus': 'autofocus', + 'autocomplete': 'off' + }) class OTPSetupForm(forms.Form):