2020-01-09 03:17:31 +01:00
|
|
|
from flask_wtf import FlaskForm
|
2020-01-09 19:13:24 +01:00
|
|
|
from wtforms import BooleanField, PasswordField, SelectField, StringField, SubmitField
|
2020-01-09 03:17:31 +01:00
|
|
|
from wtforms.validators import DataRequired
|
|
|
|
|
|
|
|
|
|
|
|
class LoginForm(FlaskForm):
|
|
|
|
username = StringField("Username", validators=[DataRequired()])
|
|
|
|
password = PasswordField("Password", validators=[DataRequired()])
|
|
|
|
remember_me = BooleanField("Remember Me")
|
|
|
|
submit = SubmitField("Sign In")
|
2020-01-09 19:13:24 +01:00
|
|
|
|
|
|
|
|
2020-01-10 23:29:23 +01:00
|
|
|
class AnnualForm(FlaskForm):
|
2020-01-09 19:13:24 +01:00
|
|
|
year_list = [
|
|
|
|
("2011", 2011),
|
|
|
|
("2012", 2012),
|
|
|
|
("2013", 2013),
|
|
|
|
("2014", 2014),
|
|
|
|
("2015", 2015),
|
|
|
|
("2016", 2016),
|
|
|
|
("2017", 2017),
|
|
|
|
("2018", 2018),
|
|
|
|
]
|
2020-01-09 22:30:00 +01:00
|
|
|
name = StringField("Search by Glacier Name")
|
|
|
|
year = SelectField("Search by Year", validators=[DataRequired()], choices=year_list)
|
2020-01-09 19:13:24 +01:00
|
|
|
submit = SubmitField("Search")
|
|
|
|
|
|
|
|
|
2020-01-10 23:29:23 +01:00
|
|
|
class PlotForm(FlaskForm):
|
|
|
|
name = StringField("Glacier Name", validators=[DataRequired()])
|
2020-01-09 19:13:24 +01:00
|
|
|
submit = SubmitField("Search")
|