rollerverbrauch/app/forms/vehicle.py

21 lines
554 B
Python

from flask_wtf import Form
from wtforms import StringField, SubmitField, SelectField, SelectMultipleField
from wtforms.validators import Length
class SelectVehicleForm(Form):
vehicle = SelectField('Vehicle', coerce=int)
submit = SubmitField(label='Do it!')
class EditVehicleForm(Form):
name = StringField('Name', validators=[Length(1, 255)])
consumables = SelectMultipleField('Consumables', coerce=int,validators=[])
submit = SubmitField(label='Do it!')
class DeleteVehicleForm(Form):
submit = SubmitField(label='Do it!')