changes
This commit is contained in:
15
plugins/growlog/forms.py
Normal file
15
plugins/growlog/forms.py
Normal file
@ -0,0 +1,15 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import TextAreaField, SelectField, SubmitField
|
||||
from wtforms.validators import DataRequired, Length
|
||||
|
||||
class GrowLogForm(FlaskForm):
|
||||
event_type = SelectField('Event Type', choices=[
|
||||
('water', 'Watered'),
|
||||
('fertilizer', 'Fertilized'),
|
||||
('repot', 'Repotted'),
|
||||
('note', 'Note'),
|
||||
('pest', 'Pest Observed')
|
||||
], validators=[DataRequired()])
|
||||
|
||||
note = TextAreaField('Notes', validators=[Length(max=1000)])
|
||||
submit = SubmitField('Add Log')
|
Reference in New Issue
Block a user