mirror of https://github.com/logos-co/open-law.git
16 lines
382 B
Python
16 lines
382 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import StringField, SubmitField
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
|
|
class BaseBookForm(FlaskForm):
|
|
label = StringField("Label", [DataRequired(), Length(6, 256)])
|
|
|
|
|
|
class CreateBookForm(BaseBookForm):
|
|
submit = SubmitField("Add new book")
|
|
|
|
|
|
class EditBookForm(BaseBookForm):
|
|
submit = SubmitField("Edit book")
|