Merge the auto-forward and antispam settings

This commit is contained in:
kaiyou
2018-04-11 21:28:36 +02:00
parent 3ef4e1f6b7
commit fa0bda7b69
3 changed files with 16 additions and 17 deletions

View File

@@ -87,6 +87,11 @@ class UserSettingsForm(flask_wtf.FlaskForm):
displayed_name = fields.StringField(_('Displayed name'))
spam_enabled = fields.BooleanField(_('Enable spam filter'))
spam_threshold = fields_.IntegerSliderField(_('Spam filter tolerance'))
forward_enabled = fields.BooleanField(_('Enable forwarding'))
forward_keep = fields.BooleanField(_('Keep a copy of the emails'))
forward_destination = fields.StringField(
_('Destination'), [validators.Optional(), validators.Email()]
)
submit = fields.SubmitField(_('Save settings'))
@@ -96,15 +101,6 @@ class UserPasswordForm(flask_wtf.FlaskForm):
submit = fields.SubmitField(_('Update password'))
class UserForwardForm(flask_wtf.FlaskForm):
forward_enabled = fields.BooleanField(_('Enable forwarding'))
forward_keep = fields.BooleanField(_('Keep a copy of the emails'))
forward_destination = fields.StringField(
_('Destination'), [validators.Optional(), validators.Email()]
)
submit = fields.SubmitField(_('Update'))
class UserReplyForm(flask_wtf.FlaskForm):
reply_enabled = fields.BooleanField(_('Enable automatic reply'))
reply_subject = fields.StringField(_('Reply subject'))