-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
65 lines (48 loc) · 2.42 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from flask_wtf import FlaskForm, RecaptchaField
from wtforms import StringField, SubmitField, PasswordField, EmailField, SelectField
from wtforms.validators import DataRequired
from flask_ckeditor import CKEditorField
# WTForm
class CreateUserForm(FlaskForm):
email = EmailField("Email", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
confirm_password = PasswordField("Confirm Password", validators=[DataRequired()])
name = StringField("Name", validators=[DataRequired()])
project_name = StringField("Project Name", validators=[DataRequired()])
recaptcha = RecaptchaField()
submit = SubmitField("Sign Up")
class LogInForm(FlaskForm):
email = EmailField("Email", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
recaptcha = RecaptchaField()
submit = SubmitField("Log In")
class AddBugForm(FlaskForm):
title = StringField("Title", validators=[DataRequired()])
priority = SelectField("Priority", choices=[('Critical', 'Critical'), ('Medium', 'Medium'), ('Soft', 'Soft')], validators=[DataRequired()])
responsible = SelectField(u'Group', coerce=int, validators=[DataRequired()])
body = CKEditorField("Body", validators=[DataRequired()])
submit = SubmitField("Add")
class AddMemberForm(FlaskForm):
name = StringField("Name", validators=[DataRequired()])
email = EmailField("Email", validators=[DataRequired()])
password = StringField("Password", validators=[DataRequired()])
role = StringField("Role", validators=[DataRequired()])
submit = SubmitField("Submit")
class EditMemberForm(FlaskForm):
name = StringField("Name", validators=[DataRequired()])
role = StringField("Role", validators=[DataRequired()])
submit = SubmitField("Submit1")
class EditProjectForm(FlaskForm):
title = StringField("Title", validators=[DataRequired()])
submit1 = SubmitField("Submit")
class EditProfileForm(FlaskForm):
name = StringField("Name", validators=[DataRequired()])
new_password = StringField("New Password")
submit2 = SubmitField("Submit2")
class SendReportForm(FlaskForm):
title = StringField("Title", validators=[DataRequired()])
body = CKEditorField("Description", validators=[DataRequired()])
submit = SubmitField("Report")
class RemindPassForm(FlaskForm):
email = EmailField("Email", validators=[DataRequired()])
submit = SubmitField("Send")