mirror of
https://github.com/logos-co/open-law.git
synced 2025-01-24 13:49:26 +00:00
19 lines
501 B
Python
19 lines
501 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(4, 256)])
|
|
about = StringField("About")
|
|
tags = StringField("Tags")
|
|
|
|
|
|
class CreateBookForm(BaseBookForm):
|
|
submit = SubmitField("Add new book")
|
|
|
|
|
|
class EditBookForm(BaseBookForm):
|
|
book_id = StringField("User ID", [DataRequired()])
|
|
submit = SubmitField("Edit book")
|