-
Notifications
You must be signed in to change notification settings - Fork 1
/
forms.py
88 lines (70 loc) · 4.02 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,SubmitField,IntegerField,BooleanField,FileField,FormField
from wtforms.validators import DataRequired, Length, Email, EqualTo , URL
class RegistrationForm(FlaskForm):
username= StringField('Username', validators=[DataRequired(),Length(min=2,max=25)])
email= StringField('Email', validators=[DataRequired(), Email()])
password= PasswordField('Password', validators=[DataRequired(),Length(min=2,max=25)])
confirm_password= PasswordField('Confirm Password', validators=[DataRequired(),EqualTo('password')])
submit=SubmitField('Sign up')
class ProfileForm(FlaskForm):
FirstName= StringField('First Name', validators=[DataRequired(),Length(min=2,max=25)])
LastName= StringField('Last Name', validators=[DataRequired(),Length(min=2,max=25)])
location=StringField('City',validators=[DataRequired(),Length(min=2,max=20)])
CurrentJob=StringField('Title / Position')
Notworking=BooleanField('Open for Cases')
Linkedin=StringField('Linkedin',validators=[URL()])
Facebook=StringField('Facebook',validators=[URL()])
Instagram=StringField('Instagram',validators=[URL()])
MinFee=IntegerField('Minimum Fee',validators=[DataRequired()])
MaxFee=IntegerField('Maximum Fee',validators=[DataRequired()])
FirstSpec=StringField('Specialization 1',validators=[DataRequired()])
SecSpec=StringField('Specialization 2')
ThirdSpec=StringField('Specialization 3')
Bio=StringField('Bio', validators=[DataRequired(),Length(min=2,max=200)])
Number=IntegerField('Phone Number',validators=[DataRequired()])
Profilephoto=FileField('Profile Photo')
Educational_qualif_1 = StringField('Educational Qualification 1', validators=[Length(min=2,max=200)])
Educational_Institution_1 = StringField('Educational Institution', validators=[Length(min=2,max=200)])
From_1 = StringField('From')
To_1 = StringField('To')
Educational_qualif_2 = StringField('Educational Qualification 2', validators=[Length(min=2,max=200)] )
Educational_Institution_2 = StringField('Educational Institution', validators=[Length(min=2,max=200)])
From_2 = StringField('From',)
To_2 = StringField('To')
Educational_qualif_3 = StringField('Educational Qualification 3', validators=[Length(min=2,max=200)])
Educational_Institution_3 = StringField('Educational Institution', validators=[Length(min=2,max=200)])
From_3 = StringField('From')
To_3 = StringField('To')
Prof_qualif_1 = StringField('Proffesional Qualification 1', validators=[Length(min=0,max=200)])
Institution_1 = StringField('Institution', validators=[Length(min=0,max=200)])
From_prof_1 = StringField('From')
To_prof_1 = StringField('To')
Prof_qualif_2 = StringField('Proffesional Qualification 2', validators=[Length(min=0,max=200)])
Institution_2 = StringField('Institution', validators=[Length(min=0,max=200)])
From_prof_2 = StringField('From')
To_prof_2 = StringField('To')
Prof_qualif_3 = StringField('Proffesional Qualification 3', validators=[Length(min=0,max=200)])
Institution_3 = StringField('Institution', validators=[Length(min=0,max=200)])
From_prof_3 = StringField('From')
To_prof_3 = StringField('To')
#Resume=FileField(u'Resume', [validators.regexp(u'^[^/\\]\.jpg$')])
Submit=SubmitField()
class LoginForm(FlaskForm):
email= StringField('Email', validators=[DataRequired(), Email()])
password= PasswordField('Password', validators=[DataRequired(),Length(min=2,max=25)])
remember = BooleanField('remember me')
submit=SubmitField('Sign in')
class File_upload(FlaskForm):
case_file = FileField('Case File')
class CaseForm(FlaskForm):
Name= StringField('Name', validators=[DataRequired(),Length(min=2,max=25)])
Day=IntegerField('Day (Eg: 01)',validators=[DataRequired()])
Month=IntegerField('Month (Eg:01 for Jan)',validators=[DataRequired()])
Year=IntegerField('Month (Eg:2001)',validators=[DataRequired()])
Bio=StringField('Summary of case ', validators=[DataRequired(),Length(min=2,max=200)])
case_file = FileField('Case File')
submit=SubmitField()
class SearchForm(FlaskForm):
searchinput= StringField('Search')
submit=SubmitField('🔍')