8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Move should_send_confirmation_email in EmailSettingsForm for consistency

This commit is contained in:
Jean-Romain Garnier 2020-04-17 17:04:00 +00:00 committed by Supelec Rezo Rennes
parent 2532f8a142
commit 2a4bd6bd79

View file

@ -853,14 +853,12 @@ class EMailAddressForm(FormRevMixin, ModelForm):
class EmailSettingsForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
"""Edit email-related settings"""
should_send_confirmation_email = False
def __init__(self, *args, **kwargs):
prefix = kwargs.pop("prefix", self.Meta.model.__name__)
super(EmailSettingsForm, self).__init__(*args, prefix=prefix, **kwargs)
self.should_send_confirmation_email = False
self.fields["email"].label = _("Main email address")
if "local_email_redirect" in self.fields:
self.fields["local_email_redirect"].label = _("Redirect local emails")
if "local_email_enabled" in self.fields: