2022-04-19 21:14:01 +02:00
|
|
|
from django import forms
|
|
|
|
|
|
|
|
|
|
|
|
class LoginForm(forms.Form):
|
|
|
|
email = forms.CharField(
|
|
|
|
label="Email",
|
|
|
|
max_length=255,
|
2022-04-19 22:56:42 +02:00
|
|
|
widget=forms.EmailInput(attrs={"id": "login-email", "class": "input", "data-login-target": "email"})
|
2022-04-19 21:14:01 +02:00
|
|
|
)
|
|
|
|
password = forms.CharField(
|
|
|
|
label="Password",
|
|
|
|
max_length=255,
|
2022-04-19 22:56:42 +02:00
|
|
|
widget=forms.PasswordInput(attrs={"id": "login-password", "class": "input", "data-login-target": "password"})
|
2022-04-19 21:14:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class SignupForm(forms.Form):
|
|
|
|
username = forms.CharField(
|
|
|
|
label="Username",
|
|
|
|
max_length=255,
|
2022-04-19 22:56:42 +02:00
|
|
|
widget=forms.TextInput(attrs={"id": "signup-username", "class": "input", "data-signup-target": "username"})
|
2022-04-19 21:14:01 +02:00
|
|
|
)
|
|
|
|
email = forms.EmailField(
|
|
|
|
label="Email",
|
|
|
|
max_length=255,
|
2022-04-19 22:56:42 +02:00
|
|
|
widget=forms.EmailInput(attrs={"id": "signup-email", "class": "input", "data-signup-target": "email"})
|
2022-04-19 21:14:01 +02:00
|
|
|
)
|
|
|
|
password = forms.CharField(
|
|
|
|
label="Password",
|
|
|
|
max_length=255,
|
2022-04-19 22:56:42 +02:00
|
|
|
widget=forms.PasswordInput(attrs={"id": "signup-password", "class": "input", "data-signup-target": "password"})
|
2022-04-19 21:14:01 +02:00
|
|
|
)
|
|
|
|
password_confirm = forms.CharField(
|
|
|
|
label="Confirm Password",
|
|
|
|
max_length=255,
|
|
|
|
widget=forms.PasswordInput(
|
2022-04-19 22:56:42 +02:00
|
|
|
attrs={"id": "signup-password-confirm", "class": "input", "data-signup-target": "passwordConfirm"}
|
2022-04-19 21:14:01 +02:00
|
|
|
),
|
|
|
|
)
|