DoorAdmin/templates/edit.html

46 lines
1.1 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Token editieren</title>
<script src="../static/jquery-3.6.0.js"></script>
</head>
<body>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<div>
<p>
Token {{ token }} editieren:
</p>
<form method="POST">
<p>{{ form.csrf_token }}
<p>{{ form.name.label }} {{ form.name(size=20) }}</p>
<p>{{ form.email.label }} {{ form.email(size=20) }}</p>
<p>{{ form.limit_validity.label }} {{ form.limit_validity() }}</p>
<div id="valid_thru_dialog" {% if not form.limit_validity.data %}hidden{% endif %}>
<p>{{ form.valid_thru.label }} {{ form.valid_thru() }}</p>
</div>
<p>{{ form.active.label }} {{ form.active() }}</p>
<input type="submit" value="Speichern">
</form>
</div>
</body>
<script>
$(function () {
$("#limit_validity").on("click", function () {
$("#valid_thru_dialog").toggle(this.checked);
});
});
</script>
</html>