From 346ace5fb3c0096012b2d73ec8204c8c5b8a78a0 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sat, 18 Dec 2021 15:38:07 +0100 Subject: [PATCH] Make webmail the default action --- core/admin/mailu/sso/forms.py | 2 +- core/admin/mailu/sso/views/base.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/admin/mailu/sso/forms.py b/core/admin/mailu/sso/forms.py index c190b8bc..5cf38dbe 100644 --- a/core/admin/mailu/sso/forms.py +++ b/core/admin/mailu/sso/forms.py @@ -7,5 +7,5 @@ class LoginForm(flask_wtf.FlaskForm): csrf = False email = fields.StringField(_('E-mail'), [validators.Email(), validators.DataRequired()]) pw = fields.PasswordField(_('Password'), [validators.DataRequired()]) - submitAdmin = fields.SubmitField(_('Sign in')) submitWebmail = fields.SubmitField(_('Sign in')) + submitAdmin = fields.SubmitField(_('Sign in')) diff --git a/core/admin/mailu/sso/views/base.py b/core/admin/mailu/sso/views/base.py index 390d5bbf..cf2e166c 100644 --- a/core/admin/mailu/sso/views/base.py +++ b/core/admin/mailu/sso/views/base.py @@ -15,10 +15,10 @@ def login(): form.submitWebmail.label.text = form.submitWebmail.label.text + ' Webmail' fields = [] - if str(app.config["ADMIN"]).upper() != "FALSE": - fields.append(form.submitAdmin) if str(app.config["WEBMAIL"]).upper() != "NONE": fields.append(form.submitWebmail) + if str(app.config["ADMIN"]).upper() != "FALSE": + fields.append(form.submitAdmin) fields = [fields] if form.validate_on_submit():