2019-07-05 12:47:35 +00:00
|
|
|
from flask_wtf import FlaskForm
|
|
|
|
from wtforms import StringField, PasswordField, BooleanField, SubmitField
|
2019-07-08 09:08:24 +00:00
|
|
|
from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo
|
|
|
|
from wtforms import ValidationError
|
|
|
|
from ..models import User
|
2019-07-05 12:47:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LoginForm(FlaskForm):
|
|
|
|
email = StringField('Email', validators=[DataRequired(), Length(1, 64),
|
|
|
|
Email()])
|
|
|
|
password = PasswordField('Password', validators=[DataRequired()])
|
|
|
|
remember_me = BooleanField('Keep me logged in')
|
|
|
|
submit = SubmitField('Log In')
|
2019-07-08 09:08:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RegistrationForm(FlaskForm):
|
|
|
|
email = StringField('Email', validators=[DataRequired(), Length(1, 64), Email()])
|
2019-07-08 09:10:00 +00:00
|
|
|
|
|
|
|
|
2019-07-08 08:54:29 +00:00
|
|
|
class PasswordResetRequestForm(FlaskForm):
|
|
|
|
email = StringField('Email', validators=[DataRequired(), Length(1, 64),
|
|
|
|
Email()])
|
|
|
|
submit = SubmitField('Reset Password')
|