-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
46 lines (37 loc) · 2.03 KB
/
forms.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from flask_wtf import FlaskForm
from wtforms.validators import EqualTo, InputRequired, Email, Optional
from wtforms.fields.simple import FileField, PasswordField, SubmitField, EmailField, StringField
class LoginForm(FlaskForm):
email = EmailField("Enter Email", validators=[InputRequired(), Email()])
# username = StringField("Enter username: ", validators=[InputRequired()])
password = PasswordField("Enter Password", validators=[InputRequired()])
submit = SubmitField("Log In")
class RegisterForm(FlaskForm):
username = StringField("Enter Username", validators=[InputRequired()])
password = PasswordField("Enter Password", validators=[InputRequired()])
confirm_password = PasswordField("Confirm Password", validators=[InputRequired(), EqualTo('password')])
email = EmailField("Enter Email", validators=[InputRequired(), Email()])
submit = SubmitField("Join")
class VideoForm(FlaskForm):
video = StringField("Enter Video Link", id="video-field")
submit = SubmitField("Load YouTube Link", id="video-button")
class RoomForm(FlaskForm):
room = StringField("Room Code", validators=[InputRequired()])
submit = SubmitField("Enter")
class NewRoomForm(FlaskForm):
name = StringField("Room Name", validators=[InputRequired()])
description = StringField("Description", validators=[Optional()])
submit = SubmitField("Create")
class DeleteRoomForm(FlaskForm):
# code = StringField("Code", validators=[InputRequired()])
submit = SubmitField(" X ")
class ResetPasswordForm(FlaskForm):
password = PasswordField("Enter New Password", validators=[InputRequired()])
confirm_password = PasswordField("Confirm Password", validators=[InputRequired(), EqualTo('password')])
submit = SubmitField("Submit")
class ResetPasswordRequestForm(FlaskForm):
email = StringField('Email', validators=[InputRequired(), Email()])
submit = SubmitField('Request Password Reset')
class VideoUploadForm(FlaskForm):
video = FileField("Video", validators=[InputRequired()])
submitVideo = SubmitField("Submit")