From d5fa80675fbc13480fd05ea120b48073cb70d551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Teijelo=20P=C3=A9rez?= Date: Sun, 8 Nov 2015 17:17:04 -0500 Subject: [PATCH] Polish up admin messages --- main.py | 4 +++- templates/admin.html | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 79c57f0..9dc664c 100755 --- a/main.py +++ b/main.py @@ -178,7 +178,9 @@ def admin(): if pass1 is None or \ pass2 is None or \ pass1 != pass2: - return render_template("admin.html", create_error=True, errormsg="Password do not match") + return render_template("admin.html", create_error=True, errormsg="Passwords do not match") + if pass1 == '': + return render_template("admin.html", create_error=True, errormsg="Password cannot be empty") create_user(username,pass1,creator) flash("User created successfully") diff --git a/templates/admin.html b/templates/admin.html index 4c52423..89d364a 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -12,7 +12,9 @@ {% if messages %} {% endif %} @@ -42,7 +44,7 @@ {% if create_error %}
-

Error: {{ errormsg }}

+
{{ errormsg }}
{% endif %}