2020-04-09 12:02:05 +00:00
|
|
|
from flask_wtf import FlaskForm
|
2022-09-01 18:52:02 +00:00
|
|
|
from wtforms import HiddenField, SelectField, StringField
|
2021-12-16 23:00:44 +00:00
|
|
|
from wtforms.fields.html5 import SearchField, URLField
|
2020-04-09 12:02:05 +00:00
|
|
|
from wtforms.validators import DataRequired
|
|
|
|
|
|
|
|
|
|
|
|
class SearchForm(FlaskForm):
|
2022-09-01 18:52:02 +00:00
|
|
|
q = SearchField("search", validators=[DataRequired()])
|
2020-04-09 12:02:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DeleteForm(FlaskForm):
|
|
|
|
class Meta:
|
|
|
|
csrf = False
|
|
|
|
|
2022-09-01 18:52:02 +00:00
|
|
|
id = HiddenField("id", validators=[DataRequired()])
|
2020-04-09 12:02:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EditForm(FlaskForm):
|
2022-09-01 18:52:02 +00:00
|
|
|
id = HiddenField("id")
|
|
|
|
folder = SelectField("folder", validators=[DataRequired()])
|
|
|
|
name = StringField("name", validators=[DataRequired()])
|
|
|
|
link = URLField("link", validators=[DataRequired()])
|
|
|
|
season = StringField("season", validators=[DataRequired()])
|
|
|
|
comment = StringField("comment")
|
|
|
|
keyword = StringField("keyword", validators=[DataRequired()])
|
2021-07-10 15:28:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
class FolderEditForm(FlaskForm):
|
2022-09-01 18:52:02 +00:00
|
|
|
id = HiddenField("id")
|
|
|
|
name = StringField("name", validators=[DataRequired()])
|
|
|
|
path = StringField("path")
|
2021-07-10 15:28:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
class FolderDeleteForm(FlaskForm):
|
|
|
|
class Meta:
|
|
|
|
csrf = False
|
|
|
|
|
2022-09-01 18:52:02 +00:00
|
|
|
id = HiddenField("id", validators=[DataRequired()])
|