2091: Make webmail the default login action r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Make login to webmail the default action; this was discussed on #mailu-dev and is probably not a bad idea

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
master
bors[bot] 3 years ago committed by GitHub
commit e0a7880ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,5 +7,5 @@ class LoginForm(flask_wtf.FlaskForm):
csrf = False csrf = False
email = fields.StringField(_('E-mail'), [validators.Email(), validators.DataRequired()]) email = fields.StringField(_('E-mail'), [validators.Email(), validators.DataRequired()])
pw = fields.PasswordField(_('Password'), [validators.DataRequired()]) pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
submitAdmin = fields.SubmitField(_('Sign in'))
submitWebmail = fields.SubmitField(_('Sign in')) submitWebmail = fields.SubmitField(_('Sign in'))
submitAdmin = fields.SubmitField(_('Sign in'))

@ -15,10 +15,10 @@ def login():
form.submitWebmail.label.text = form.submitWebmail.label.text + ' Webmail' form.submitWebmail.label.text = form.submitWebmail.label.text + ' Webmail'
fields = [] fields = []
if str(app.config["ADMIN"]).upper() != "FALSE":
fields.append(form.submitAdmin)
if str(app.config["WEBMAIL"]).upper() != "NONE": if str(app.config["WEBMAIL"]).upper() != "NONE":
fields.append(form.submitWebmail) fields.append(form.submitWebmail)
if str(app.config["ADMIN"]).upper() != "FALSE":
fields.append(form.submitAdmin)
fields = [fields] fields = [fields]
if form.validate_on_submit(): if form.validate_on_submit():

Loading…
Cancel
Save