Skip to content

Commit

Permalink
input type was added into internal confirmation forms
Browse files Browse the repository at this point in the history
  • Loading branch information
gotlium committed Dec 8, 2014
1 parent ee69b6d commit c0d4f2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions secureauth/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ def _(message):
])

AUTH_USER_MODEL = get_settings('AUTH_USER_MODEL', 'auth.User')
INPUT_TYPE = get_settings('AUTH_INPUT_TYPE', 'password')
8 changes: 6 additions & 2 deletions secureauth/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from models import (
UserAuthNotification, UserAuthLogging, UserAuthToken, UserAuthAttempt,
UserAuthCode, UserAuthPhone, UserAuthQuestion, UserAuthIP, UserAuthIPRange)
from defaults import CHECK_PASSWORD
from defaults import CHECK_PASSWORD, INPUT_TYPE
from utils.sign import Sign
from utils import is_phone

Expand Down Expand Up @@ -59,7 +59,11 @@ def save(self):


class CodeForm(forms.Form):
code = forms.CharField(label=_('Code'), required=True)
code = forms.CharField(
label=_('Code'), required=True,
widget=forms.TextInput(attrs={
'autocomplete': 'off', 'type': INPUT_TYPE
}))

def __init__(self, user, model, *args, **kwargs):
self.user = user
Expand Down

0 comments on commit c0d4f2d

Please sign in to comment.