From f1bf954ed9c032d81d3c6e23b4681c5ae0ea83e2 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Wed, 30 Jan 2019 23:36:07 -0600 Subject: [PATCH] Actually use jinja2 formatting for if --- templates/admin.html | 86 ++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/templates/admin.html b/templates/admin.html index f26478e..884106e 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -8,40 +8,40 @@
- - - - - - - + + + + + + + - {% for registration_code in registration_codes %} - - - - - - - + + + + + + - - {% endfor %} + {% else %} + 0 %} disabled="true" {% endif %}> + {% endif %} + + + + {% endfor %}
Registration CodeCreation TimeExpiration TimeUsagesMax UsagesRegistration LinkExpireRegistration CodeCreation TimeExpiration TimeUsagesMax UsagesRegistration LinkExpire
{{ registration_code.code|tojson|safe }}{{ registration_code.creation_time|tojson|safe }}{{ registration_code.expiration_time|tojson|safe }}{{ registration_code.usages|tojson|safe }}{{ registration_code.max_usages|tojson|safe }} - {% if not registration_code.is_expired() and registration_code.has_available_uses() %} + {% for registration_code in registration_codes %} +
{{ registration_code.code|tojson|safe }}{{ registration_code.creation_time|tojson|safe }}{{ registration_code.expiration_time|tojson|safe }}{{ registration_code.usages|tojson|safe }}{{ registration_code.max_usages|tojson|safe }} + {% if not registration_code.is_expired() and registration_code.has_available_uses() %} link - {% endif %} - -
- - - {% if not registration_code.is_expired() %} + {% endif %} +
+ + + + {% if not registration_code.is_expired() %} - {% else %} - 0 %}> - {% endif %} - -
@@ -50,19 +50,19 @@ - - - + + + - {% for registered_user in registered_users %} - - - - - - - {% endfor %} + {% for registered_user in registered_users %} + + + + + + + {% endfor %}
Matrix IDUserRegistration TimeRegistration CodeUserRegistration TimeRegistration Code
{{ registered_user.registered_user_id|tojson|safe }}{{ registered_user.username|tojson|safe }}{{ registered_user.registered_time|tojson|safe }}{{ registered_user.registration_code|tojson|safe }}
{{ registered_user.registered_user_id|tojson|safe }}{{ registered_user.username|tojson|safe }}{{ registered_user.registered_time|tojson|safe }}{{ registered_user.registration_code|tojson|safe }}
@@ -71,10 +71,10 @@
{{ add_registration_code_form.csrf_token }}
- {{ add_registration_code_form.expiration_time.label }} {{ add_registration_code_form.expiration_time() }} + {{ add_registration_code_form.expiration_time.label }} {{ add_registration_code_form.expiration_time() }}
- {{ add_registration_code_form.max_usages.label }} {{ add_registration_code_form.max_usages(default="1", value="1") }} + {{ add_registration_code_form.max_usages.label }} {{ add_registration_code_form.max_usages(default="1", value="1") }}