Polish up admin messages

This commit is contained in:
Andy Teijelo Pérez 2015-11-08 17:17:04 -05:00
parent 932c6929c4
commit d5fa80675f
2 changed files with 7 additions and 3 deletions

View file

@ -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")

View file

@ -12,7 +12,9 @@
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
<div class="alert alert-info">
{{ message }}
</div>
{% endfor %}
</ul>
{% endif %}
@ -42,7 +44,7 @@
</div>
{% if create_error %}
<center>
<p>Error: {{ errormsg }}</p>
<div class="col-sm-offset-2 col-sm-10 alert alert-danger">{{ errormsg }}</div>
</center>
{% endif %}
<div class="form-group">