mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-16 02:46:44 +02:00
Improve indendation of conditions.
This commit is contained in:
parent
5d81846c5d
commit
615743b331
@ -11,14 +11,28 @@ def login():
|
||||
form = forms.LoginForm()
|
||||
endpoint = flask.request.args.get('next', 'ui.index')
|
||||
|
||||
if str(app.config['WEBMAIL']).upper() != 'NONE' and str(app.config['ADMIN']).upper() != 'FALSE' and endpoint != 'ui.webmail':
|
||||
form.target.choices = [('Admin', 'Admin'), ('Webmail', 'Webmail')]
|
||||
elif str(app.config['WEBMAIL']).upper() != 'NONE' and str(app.config['ADMIN']).upper() != 'FALSE' and endpoint == 'ui.webmail':
|
||||
form.target.choices = [('Webmail', 'Webmail'), ('Admin', 'Admin')]
|
||||
elif str(app.config['WEBMAIL']).upper() != 'NONE' and str(app.config['ADMIN']).upper() == 'FALSE':
|
||||
form.target.choices = [('Webmail', 'Webmail')]
|
||||
elif str(app.config['WEBMAIL']).upper() == 'NONE' and str(app.config['ADMIN']).upper() != 'FALSE':
|
||||
form.target.choices = [('Admin', 'Admin')]
|
||||
if (
|
||||
str(app.config["WEBMAIL"]).upper() != "NONE"
|
||||
and str(app.config["ADMIN"]).upper() != "FALSE"
|
||||
and endpoint != "ui.webmail"
|
||||
):
|
||||
form.target.choices = [("Admin", "Admin"), ("Webmail", "Webmail")]
|
||||
elif (
|
||||
str(app.config["WEBMAIL"]).upper() != "NONE"
|
||||
and str(app.config["ADMIN"]).upper() != "FALSE"
|
||||
and endpoint == "ui.webmail"
|
||||
):
|
||||
form.target.choices = [("Webmail", "Webmail"), ("Admin", "Admin")]
|
||||
elif (
|
||||
str(app.config["WEBMAIL"]).upper() != "NONE"
|
||||
and str(app.config["ADMIN"]).upper() == "FALSE"
|
||||
):
|
||||
form.target.choices = [("Webmail", "Webmail")]
|
||||
elif (
|
||||
str(app.config["WEBMAIL"]).upper() == "NONE"
|
||||
and str(app.config["ADMIN"]).upper() != "FALSE"
|
||||
):
|
||||
form.target.choices = [("Admin", "Admin")]
|
||||
|
||||
if form.validate_on_submit():
|
||||
if str(form.target.data) == 'Admin':
|
||||
|
Loading…
Reference in New Issue
Block a user