DoorAdmin/imaginaerraum_door_admin/templates/register.html

72 lines
1.9 KiB
HTML
Raw Normal View History

2021-03-14 16:08:46 +00:00
{% extends 'base.html' %}
{% block header %}
{% block title %}<h1>Token Registrierung</h1>{% endblock %}
2021-04-07 09:29:50 +00:00
<script src="../static/js/jquery-3.6.0.js"></script>
2021-03-14 16:08:46 +00:00
{% endblock %}
{% block content %}
{% if not token.vars %}
2021-04-08 18:56:31 +00:00
<div class="d-grid gap-3">
<div class="p-2 bg-light border">
2021-03-14 16:08:46 +00:00
Letzter gelesener unregistrierter Token: {{ token['token'] }} <br>
Gelesen: {{ token['timestamp']}}
2021-04-08 18:56:31 +00:00
</div>
2021-04-08 18:56:31 +00:00
<div class="p-2 bg-light border">
<h3>RaumnutzerIn registrieren:</h3>
<form method="POST">
<table>
{{ form.csrf_token }}
<tr>
<td>{{ form.name.label }}</td>
<td>{{ form.name(size=20) }}</td>
</tr>
<tr>
<td>{{ form.email.label }}</td>
<td>{{ form.email(size=20) }}</td>
</tr>
<tr>
<td>{{ form.organization.label }}</td>
<td>{{ form.organization(size=20) }}</td>
</tr>
<tr>
<td>{{ form.limit_validity.label }}</td>
<td> {{ form.limit_validity() }}</td>
</tr>
2021-03-08 20:31:25 +00:00
2021-04-08 18:56:31 +00:00
<tr id="valid_thru_row" style="display: none">
<td>{{ form.valid_thru.label }} </td>
<td>{{ form.valid_thru() }}</td>
</tr>
<tr>
<td>{{ form.dsgvo.label }} </td>
<td> {{ form.dsgvo() }}</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Abschicken">
</td>
</tr>
</table>
</form>
</div>
2021-04-08 18:56:31 +00:00
</div>
{% else %}
2021-03-14 16:08:46 +00:00
Keine unregistrierten Tokens in MQTT Nachrichten. Bitte Token scannen und die Seite neu laden.
{% endif %}
<script>
$(function () {
$("#limit_validity").on("click", function () {
2021-03-08 20:31:25 +00:00
if (this.checked) {
$("#valid_thru_row").css("display", "table-row")
}
else {
$("#valid_thru_row").css("display", "none")
}
});
});
</script>
2021-03-14 16:08:46 +00:00
{% endblock %}