2023-11-30 06:36:08 +13:00
|
|
|
from flask_wtf import FlaskForm
|
2023-11-30 23:21:37 +13:00
|
|
|
from wtforms import TextAreaField, SubmitField, BooleanField
|
2023-11-30 06:36:08 +13:00
|
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
from flask_babel import _, lazy_gettext as _l
|
|
|
|
|
|
|
|
|
|
|
|
class NewReplyForm(FlaskForm):
|
|
|
|
body = TextAreaField(_l('Body'), render_kw={'placeholder': 'What are your thoughts?', 'rows': 3}, validators={DataRequired(), Length(min=3, max=5000)})
|
2023-11-30 23:21:37 +13:00
|
|
|
notify_author = BooleanField(_l('Notify about replies'))
|
2023-11-30 06:36:08 +13:00
|
|
|
submit = SubmitField(_l('Comment'))
|