rollerverbrauch/app/forms/consumable.py

26 lines
859 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 SelectField, StringField, SubmitField
from wtforms.validators import Length
2016-11-06 18:53:13 +01:00
class SelectConsumableForm(FlaskForm):
2016-11-01 16:36:28 +01:00
consumable = SelectField('Consumable', coerce=int)
submit = SubmitField(label='Do it!')
2016-11-06 18:53:13 +01:00
class CreateConsumableForm(FlaskForm):
2016-11-01 16:36:28 +01:00
name = StringField('Name', validators=[Length(1, 255)])
ext_id = SelectField('Tankerkönig ID', coerce=int)
2016-11-01 16:36:28 +01:00
unit = StringField('Unit', validators=[Length(1, 255)])
submit = SubmitField(label='Do it!')
2016-11-06 18:53:13 +01:00
class EditConsumableForm(FlaskForm):
2016-11-01 16:36:28 +01:00
name = StringField('Name', validators=[Length(1, 255)])
ext_id = SelectField('Tankerkönig ID', coerce=int)
2016-11-01 16:36:28 +01:00
unit = StringField('Unit', validators=[Length(1, 255)])
submit = SubmitField(label='Do it!')
2016-11-06 18:53:13 +01:00
class DeletConsumableForm(FlaskForm):
2016-11-01 16:36:28 +01:00
submit = SubmitField(label='Do it!')