rollerverbrauch/app/forms/consumable.py

24 lines
747 B
Python

from flask_wtf import FlaskForm
from wtforms import SelectField, StringField, SubmitField
from wtforms.validators import Length
class SelectConsumableForm(FlaskForm):
consumable = SelectField('Consumable', coerce=int)
submit = SubmitField(label='Do it!')
class CreateConsumableForm(FlaskForm):
name = StringField('Name', validators=[Length(1, 255)])
unit = StringField('Unit', validators=[Length(1, 255)])
submit = SubmitField(label='Do it!')
class EditConsumableForm(FlaskForm):
name = StringField('Name', validators=[Length(1, 255)])
unit = StringField('Unit', validators=[Length(1, 255)])
submit = SubmitField(label='Do it!')
class DeletConsumableForm(FlaskForm):
submit = SubmitField(label='Do it!')