diff --git a/app.py b/app.py index e321d0d..7066a30 100644 --- a/app.py +++ b/app.py @@ -191,6 +191,8 @@ def registration(): if 'registrationCode' in request.values: form.registration_code.data = request.values['registrationCode'] + else: + flash("Missing registration code. Use provided link.", "error") return render_template('register.html', form=form) diff --git a/static/style.css b/static/style.css index b8fed52..b58ccaa 100644 --- a/static/style.css +++ b/static/style.css @@ -3,11 +3,6 @@ nav { padding: 0px 0px; } -nav h1 { - display: block; - float: left; -} - nav ul { display: block; float: right; @@ -19,6 +14,20 @@ nav ul li { padding-left: 1em; } +.flash { + padding: 0.2em; +} + +.flash-error { + color: black; + background: red; + font-weight: bold; +} + +.full-width { + width: 100%; +} + .text-center { text-align: center; } diff --git a/templates/admin.html b/templates/admin.html index 092b4df..9c7b9d6 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -12,15 +12,17 @@
- +
- - - - - - - + + + + + + + + + {% for registration_code in registration_codes %} @@ -57,7 +59,7 @@
-
Registration CodeCreation TimeExpiration TimeUsagesMax UsagesRegistration LinkExpire
Registration CodeCreation TimeExpiration TimeUsagesMax UsagesRegistration LinkExpire
+
diff --git a/templates/base.html b/templates/base.html index 923e431..8f22bce 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,8 +23,8 @@ {% block header %}{% endblock %}
- {% for message in get_flashed_messages() %} -
{{ message }}
+ {% for category, message in get_flashed_messages(with_categories=True) %} +
{{ message }}
{% endfor %}
{% block content %}{% endblock %} diff --git a/templates/register.html b/templates/register.html index 63ada2c..1ebc464 100644 --- a/templates/register.html +++ b/templates/register.html @@ -3,7 +3,7 @@ {% block header %}
-

{% block title %}Register{% endblock %}

+

{% block title %}Registration{% endblock %}

{% endblock %}
Matrix ID