8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-27 17:33:45 +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 Gabriel Detraz
parent cdc25ad5ec
commit ac7ea6cd23

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: