mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
24 lines
904 B
Python
24 lines
904 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import StringField, PasswordField, BooleanField, SubmitField
|
|
from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo
|
|
from wtforms import ValidationError
|
|
from ..models import User
|
|
|
|
|
|
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')
|
|
|
|
|
|
class RegistrationForm(FlaskForm):
|
|
email = StringField('Email', validators=[DataRequired(), Length(1, 64), Email()])
|
|
|
|
|
|
class PasswordResetRequestForm(FlaskForm):
|
|
email = StringField('Email', validators=[DataRequired(), Length(1, 64),
|
|
Email()])
|
|
submit = SubmitField('Reset Password')
|