26 lines
654 B
Python
26 lines
654 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import (
|
|
StringField,
|
|
SubmitField,
|
|
SelectField,
|
|
SelectMultipleField,
|
|
BooleanField,
|
|
)
|
|
from wtforms.validators import Length
|
|
|
|
|
|
class SelectVehicleForm(FlaskForm):
|
|
vehicle = SelectField("Vehicle", coerce=int)
|
|
submit = SubmitField(label="Do it!")
|
|
|
|
|
|
class EditVehicleForm(FlaskForm):
|
|
name = StringField("Name", validators=[Length(1, 255)])
|
|
consumables = SelectMultipleField("Consumables", coerce=int, validators=[])
|
|
is_active = BooleanField("Is active")
|
|
submit = SubmitField(label="Do it!")
|
|
|
|
|
|
class DeleteVehicleForm(FlaskForm):
|
|
submit = SubmitField(label="Do it!")
|