2023-05-04 12:14:17 +00:00
|
|
|
from flask_wtf import FlaskForm
|
2023-05-05 09:02:35 +00:00
|
|
|
from wtforms import StringField, SubmitField
|
2023-05-04 12:14:17 +00:00
|
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
|
|
|
|
|
|
|
|
class BaseInterpretationForm(FlaskForm):
|
|
|
|
label = StringField("Label", [DataRequired(), Length(3, 256)])
|
|
|
|
about = StringField("About")
|
|
|
|
|
|
|
|
|
|
|
|
class CreateInterpretationForm(BaseInterpretationForm):
|
|
|
|
section_id = StringField("Interpretation ID", [DataRequired()])
|
|
|
|
text = StringField("Text")
|
|
|
|
submit = SubmitField("Create")
|
|
|
|
|
|
|
|
|
2023-05-04 13:32:56 +00:00
|
|
|
class EditInterpretationForm(BaseInterpretationForm):
|
|
|
|
interpretation_id = StringField("Interpretation ID", [DataRequired()])
|
|
|
|
text = StringField("Text")
|
|
|
|
submit = SubmitField("Edit")
|