Refact some forms (#70)
This commit is contained in:
parent
e9948f9675
commit
555d8ae1a4
|
@ -5,28 +5,9 @@ from wtforms.validators import InputRequired, Optional
|
|||
|
||||
|
||||
# TODO: compléter le formulaire de recherche avancée
|
||||
class AdvancedSearchForm(FlaskForm):
|
||||
q = StringField(
|
||||
'Rechercher :',
|
||||
validators=[
|
||||
InputRequired(),
|
||||
],
|
||||
)
|
||||
date = DateField(
|
||||
'Date',
|
||||
validators=[
|
||||
Optional(),
|
||||
],
|
||||
)
|
||||
submit = SubmitField(
|
||||
'Affiner la recherche',
|
||||
)
|
||||
|
||||
|
||||
class SearchForm(FlaskForm):
|
||||
q = StringField(
|
||||
'Rechercher',
|
||||
validators=[
|
||||
InputRequired(),
|
||||
],
|
||||
)
|
||||
q = StringField('Rechercher', validators=[InputRequired()])
|
||||
|
||||
class AdvancedSearchForm(SearchForm):
|
||||
date = DateField('Date', validators=[Optional()])
|
||||
submit = SubmitField('Affiner la recherche')
|
||||
|
|
Loading…
Reference in New Issue