pyfedi/app/admin/forms.py

13 lines
623 B
Python
Raw Normal View History

2023-11-03 21:59:48 +13:00
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, HiddenField, BooleanField, TextAreaField
from wtforms.validators import ValidationError, DataRequired, Email, EqualTo, Length
from flask_babel import _, lazy_gettext as _l
class AdminForm(FlaskForm):
use_allowlist = BooleanField(_l('Allowlist instead of blocklist'))
allowlist = TextAreaField(_l('Allow federation with these instances'))
use_blocklist = BooleanField(_l('Blocklist instead of allowlist'))
blocklist = TextAreaField(_l('Deny federation with these instances'))
submit = SubmitField(_l('Save'))