-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
72 lines (60 loc) · 1.73 KB
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
from django import forms
from django.utils.translation import gettext as _
from django.contrib.auth.forms import AuthenticationForm, UsernameField
class AuthenticationForm(AuthenticationForm):
username = UsernameField(
widget=forms.TextInput(
attrs={
'autofocus': True,
'class': 'form-control',
'placeholder': 'Почта или телефон'
}
)
)
password = forms.CharField(
label=_("Password"),
strip=False,
widget=forms.PasswordInput(
attrs={
'autocomplete': 'current-password',
'class': 'form-control',
'placeholder': 'Пароль'
}
),
)
class PasswordForm(forms.Form):
password = forms.CharField(
label=_("enter the received code"),
strip=False,
widget=forms.PasswordInput(
attrs={
'autofocus': True,
'class': 'form-control',
'placeholder': 'Пароль'
}
),
)
class RegistrationForm(forms.Form):
email_or_phone = forms.CharField(
label=_('email or phone'),
max_length=255,
widget=forms.TextInput(
attrs={
'autofocus': True,
'class': 'form-control',
'placeholder': 'Почта или телефон'
}
),
required=True,
)
class AddBalance(forms.Form):
balance = forms.DecimalField(
label=_('balance'),
required=False,
widget=forms.NumberInput(
attrs={
'class': 'form-control',
'placeholder': 'Сумма'
}
)
)