From 3449b67c86ce0b966d9c48ff67fe3eea8548c35b Mon Sep 17 00:00:00 2001 From: Dimitri Huisman Date: Fri, 29 Oct 2021 08:18:50 +0000 Subject: [PATCH] Process code review remarks PR2023 --- core/admin/mailu/sso/__init__.py | 2 +- core/admin/mailu/sso/forms.py | 10 +------- .../mailu/sso/templates/sidebar_sso.html | 20 +++++----------- core/admin/mailu/sso/views/languages.py | 4 +--- core/admin/mailu/ui/__init__.py | 2 +- core/admin/mailu/ui/templates/sidebar.html | 6 ++--- core/nginx/conf/nginx.conf | 10 ++++---- docs/reverse.rst | 23 ++----------------- 8 files changed, 19 insertions(+), 58 deletions(-) diff --git a/core/admin/mailu/sso/__init__.py b/core/admin/mailu/sso/__init__.py index 4b4c057b..cc066234 100644 --- a/core/admin/mailu/sso/__init__.py +++ b/core/admin/mailu/sso/__init__.py @@ -1,5 +1,5 @@ from flask import Blueprint -sso = Blueprint('sso', __name__, static_folder='None' ,template_folder='templates') +sso = Blueprint('sso', __name__, static_folder=None ,template_folder='templates') from mailu.sso.views import * diff --git a/core/admin/mailu/sso/forms.py b/core/admin/mailu/sso/forms.py index fb48d9f9..c190b8bc 100644 --- a/core/admin/mailu/sso/forms.py +++ b/core/admin/mailu/sso/forms.py @@ -1,12 +1,6 @@ -from wtforms import validators, fields, widgets -from wtforms_components import fields as fields_ +from wtforms import validators, fields from flask_babel import lazy_gettext as _ - -import flask_login import flask_wtf -import re - -LOCALPART_REGEX = "^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$" class LoginForm(flask_wtf.FlaskForm): class Meta: @@ -15,5 +9,3 @@ class LoginForm(flask_wtf.FlaskForm): pw = fields.PasswordField(_('Password'), [validators.DataRequired()]) submitAdmin = fields.SubmitField(_('Sign in')) submitWebmail = fields.SubmitField(_('Sign in')) - - diff --git a/core/admin/mailu/sso/templates/sidebar_sso.html b/core/admin/mailu/sso/templates/sidebar_sso.html index 79e5832b..1c511aec 100644 --- a/core/admin/mailu/sso/templates/sidebar_sso.html +++ b/core/admin/mailu/sso/templates/sidebar_sso.html @@ -2,14 +2,6 @@