DoorAdmin/imaginaerraum_door_admin/templates/edit.html

61 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2021-03-14 16:08:46 +00:00
{% extends 'base.html' %}
{% block header %}
{% block title %}<h1>Token editieren</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 %}
<div>
<p>
Token {{ token }} editieren:
</p>
<form method="POST">
2021-03-08 20:31:25 +00:00
<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>
<tr id="valid_thru_row" style="display: {% if form.limit_validity.data %}table-row{% else %}none{% endif %}">
<td>{{ form.valid_thru.label }} </td>
<td>{{ form.valid_thru() }}</td>
</tr>
<tr>
<td>{{ form.active.label }}</td>
<td> {{ form.active() }}</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Speichern">
</td>
</tr>
</table>
</form>
2021-03-14 16:08:46 +00:00
</div>
<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 %}