summaryrefslogtreecommitdiff
path: root/app/modules/auth/forms.py
blob: c05113392150abad2df7b6529005ee783b743e32 (plain)
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
from flask_wtf import FlaskForm
from wtforms import (
    SubmitField,
    SelectField,
    HiddenField,
    StringField,
    PasswordField,
    IntegerField,
    FloatField,
    BooleanField,
    DateTimeField,
)
from wtforms.validators import InputRequired, Length, NumberRange


class LoginForm(FlaskForm):
    username = StringField("Username", validators=[InputRequired()])
    password = PasswordField("Password", validators=[InputRequired()])
    remember = BooleanField("Remember")
    submit = SubmitField("Login")


class RegisterForm(LoginForm):
    name_first = StringField("First name")
    name_last = StringField("Last name")
    email = StringField("E-mail address")
    phone_mobile = StringField("Phone number (mobile)")
    phone_alternative = StringField("Phone number (alternative)")
    submit = SubmitField("Register")
Copyright 2019--2024 Marius PETER