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'))