rollerverbrauch/app/forms/vehicle.py

21 lines
574 B
Python
Raw Normal View History

2016-11-06 18:53:13 +01:00
from flask_wtf import FlaskForm
2016-11-01 16:36:28 +01:00
from wtforms import StringField, SubmitField, SelectField, SelectMultipleField
from wtforms.validators import Length
2016-11-06 18:53:13 +01:00
class SelectVehicleForm(FlaskForm):
2016-11-01 16:36:28 +01:00
vehicle = SelectField('Vehicle', coerce=int)
submit = SubmitField(label='Do it!')
2016-11-06 18:53:13 +01:00
class EditVehicleForm(FlaskForm):
2016-11-01 16:36:28 +01:00
name = StringField('Name', validators=[Length(1, 255)])
consumables = SelectMultipleField('Consumables', coerce=int,validators=[])
submit = SubmitField(label='Do it!')
2016-11-06 18:53:13 +01:00
class DeleteVehicleForm(FlaskForm):
2016-11-01 16:36:28 +01:00
submit = SubmitField(label='Do it!')