mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
18 lines
No EOL
738 B
Python
18 lines
No EOL
738 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import StringField, SubmitField, TextAreaField, BooleanField
|
|
from wtforms.validators import ValidationError, DataRequired, Email, EqualTo, Length
|
|
from flask_babel import _, lazy_gettext as _l
|
|
|
|
|
|
class AddLocalCommunity(FlaskForm):
|
|
community_name = StringField(_l('Name'), validators=[DataRequired()])
|
|
url = StringField(_l('Url'), render_kw={'placeholder': '/c/'})
|
|
description = TextAreaField(_l('Description'))
|
|
rules = TextAreaField(_l('Rules'))
|
|
nsfw = BooleanField('18+ NSFW')
|
|
submit = SubmitField(_l('Create'))
|
|
|
|
|
|
class SearchRemoteCommunity(FlaskForm):
|
|
address = StringField(_l('Server address'), validators=[DataRequired()])
|
|
submit = SubmitField(_l('Search')) |