2023-12-03 11:33:07 +01:00
|
|
|
"""Reset Password Form form to reset a users PasswordField."""
|
|
|
|
from flask_wtf import FlaskForm
|
2023-12-03 14:19:53 +01:00
|
|
|
from wtforms import PasswordField, SubmitField, validators
|
|
|
|
from wtforms.validators import EqualTo, Length
|
2023-12-03 11:33:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
class ResetPasswordForm(FlaskForm):
|
|
|
|
"""ResetPassword for csv-library form"""
|
|
|
|
|
|
|
|
password = PasswordField(
|
|
|
|
"New password:",
|
|
|
|
validators=[validators.InputRequired(), Length(12, 72)],
|
|
|
|
)
|
|
|
|
confirmpassword = PasswordField(
|
|
|
|
"Confirm your password:",
|
|
|
|
validators=[
|
|
|
|
validators.InputRequired(),
|
|
|
|
Length(12, 72),
|
|
|
|
EqualTo("password", message="Passwords must match !"),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
submit = SubmitField("Reset your password")
|