Fix more errors
This commit is contained in:
parent
7f6ee28d7c
commit
2cf4e923f3
23
forms.py
23
forms.py
@ -3,8 +3,7 @@ import pymysql
|
|||||||
import os
|
import os
|
||||||
from app import app
|
from app import app
|
||||||
from flask_wtf import FlaskForm
|
from flask_wtf import FlaskForm
|
||||||
from wtforms import BooleanField, StringField, PasswordField, TextField, IntegerField, TextAreaField, SubmitField, RadioField, SelectField
|
from wtforms import BooleanField, StringField, PasswordField, IntegerField, TextAreaField, SubmitField, RadioField, SelectField, DateField
|
||||||
from wtforms.fields.html5 import DateField
|
|
||||||
from wtforms_components import read_only
|
from wtforms_components import read_only
|
||||||
from wtforms import validators, ValidationError
|
from wtforms import validators, ValidationError
|
||||||
from wtforms.validators import InputRequired, Email, Length
|
from wtforms.validators import InputRequired, Email, Length
|
||||||
@ -27,24 +26,24 @@ class RegisterForm(FlaskForm):
|
|||||||
class addPlayerForm(FlaskForm):
|
class addPlayerForm(FlaskForm):
|
||||||
playerClub = SelectField('Club:', choices=[])
|
playerClub = SelectField('Club:', choices=[])
|
||||||
playerTeam = SelectField('Team:', choices=[])
|
playerTeam = SelectField('Team:', choices=[])
|
||||||
playerForenames = TextField('Forenames:')
|
playerForenames = StringField('Forenames:')
|
||||||
playerSurnames = TextField('Surname:')
|
playerSurnames = StringField('Surname:')
|
||||||
playerNickname = TextField('Nickname')
|
playerNickname = StringField('Nickname')
|
||||||
playerChineseName = TextField('Chinese Name:')
|
playerChineseName = StringField('Chinese Name:')
|
||||||
playerEmailAddress = TextField('Email Address:')
|
playerEmailAddress = StringField('Email Address:')
|
||||||
playerDob = DateField('Date of Birth:', default=datetime.today, format='%Y-%m-%d')
|
playerDob = DateField('Date of Birth:', default=datetime.today, format='%Y-%m-%d')
|
||||||
playerHkid = TextField('HKID Number:')
|
playerHkid = StringField('HKID Number:')
|
||||||
playerNumber = TextField('Shirt Number:')
|
playerNumber = StringField('Shirt Number:')
|
||||||
playerTelNumber = TextField('Player Contact Number:')
|
playerTelNumber = StringField('Player Contact Number:')
|
||||||
submit = SubmitField('Submit')
|
submit = SubmitField('Submit')
|
||||||
|
|
||||||
class addTeamForm(FlaskForm):
|
class addTeamForm(FlaskForm):
|
||||||
clubName = SelectField("Club of team entry to create", coerce=str)
|
clubName = SelectField("Club of team entry to create", coerce=str)
|
||||||
teamName = TextField("Team table to create (e.g. A, B, C, etc.)", validators=[InputRequired(), Length(max=1)])
|
teamName = StringField("Team table to create (e.g. A, B, C, etc.)", validators=[InputRequired(), Length(max=1)])
|
||||||
submit = SubmitField("Submit")
|
submit = SubmitField("Submit")
|
||||||
|
|
||||||
class addClubForm(FlaskForm):
|
class addClubForm(FlaskForm):
|
||||||
clubName = TextField("Name of the Hockey Club to add")
|
clubName = StringField("Name of the Hockey Club to add")
|
||||||
submit = SubmitField("Submit")
|
submit = SubmitField("Submit")
|
||||||
|
|
||||||
class playerDbCreateForm(FlaskForm):
|
class playerDbCreateForm(FlaskForm):
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
# encoding=utf-8
|
# encoding=utf-8
|
||||||
from flask_wtf import FlaskForm
|
from flask_wtf import FlaskForm
|
||||||
from wtforms import BooleanField, StringField, PasswordField, TextField, IntegerField, TextAreaField, SubmitField, RadioField, SelectField
|
from wtforms import BooleanField, StringField, PasswordField, IntegerField, TextAreaField, SubmitField, RadioField, SelectField, DateField
|
||||||
from wtforms.fields.html5 import DateField
|
|
||||||
from wtforms_components import read_only
|
from wtforms_components import read_only
|
||||||
from wtforms import validators, ValidationError
|
from wtforms import validators, ValidationError
|
||||||
from wtforms.validators import InputRequired, Email, Length
|
from wtforms.validators import InputRequired, Email, Length
|
||||||
@ -20,8 +19,8 @@ class motmAdminForm(FlaskForm):
|
|||||||
|
|
||||||
class adminSettingsForm2(FlaskForm):
|
class adminSettingsForm2(FlaskForm):
|
||||||
nextMatch = SelectField('Fixture', choices=[])
|
nextMatch = SelectField('Fixture', choices=[])
|
||||||
nextOppoClub = TextField('Next Opposition Club:')
|
nextOppoClub = StringField('Next Opposition Club:')
|
||||||
nextOppoTeam = TextField("Next Opposition Team:")
|
nextOppoTeam = StringField("Next Opposition Team:")
|
||||||
currMotM = SelectField('Current Man of the Match:', choices=[])
|
currMotM = SelectField('Current Man of the Match:', choices=[])
|
||||||
currDotD = SelectField('Current Dick of the Day:', choices=[])
|
currDotD = SelectField('Current Dick of the Day:', choices=[])
|
||||||
saveButton = SubmitField('Save Settings')
|
saveButton = SubmitField('Save Settings')
|
||||||
@ -29,12 +28,12 @@ class adminSettingsForm2(FlaskForm):
|
|||||||
|
|
||||||
|
|
||||||
class goalsAssistsForm(FlaskForm):
|
class goalsAssistsForm(FlaskForm):
|
||||||
fixtureNumber = TextField('Fixture Number')
|
fixtureNumber = StringField('Fixture Number')
|
||||||
match = SelectField('Fixture')
|
match = SelectField('Fixture')
|
||||||
homeTeam = TextField('Home Team')
|
homeTeam = StringField('Home Team')
|
||||||
awayTeam = TextField('Away Team')
|
awayTeam = StringField('Away Team')
|
||||||
playerNumber = TextField('Player Number')
|
playerNumber = StringField('Player Number')
|
||||||
playerName = TextField('Player Name')
|
playerName = StringField('Player Name')
|
||||||
assists = SelectField('Assists:', choices=[(0, '0'), (1, '1'), (2, '2'), (3, '3'), (4, '4')])
|
assists = SelectField('Assists:', choices=[(0, '0'), (1, '1'), (2, '2'), (3, '3'), (4, '4')])
|
||||||
goals = SelectField('Goals:', choices=[(0, '0'), (1, '1'), (2, '2'), (3, '3'), (4, '4')])
|
goals = SelectField('Goals:', choices=[(0, '0'), (1, '1'), (2, '2'), (3, '3'), (4, '4')])
|
||||||
submit = SubmitField('Submit')
|
submit = SubmitField('Submit')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user