mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
index: don't show labels for buttons
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
1b59b273d8
commit
746b68eaf1
@ -10,3 +10,15 @@
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_field(field) %}
|
||||
<dd>{{ field(**kwargs)|safe }}
|
||||
{% if field.errors %}
|
||||
<ul class=errors>
|
||||
{% for error in field.errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endmacro %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% from "formhelpers.html" import render_field_label %}
|
||||
{% from "formhelpers.html" import render_field_label, render_field %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -37,11 +37,13 @@
|
||||
margin-top: 40px;
|
||||
}
|
||||
</style>
|
||||
{{ state_img }}
|
||||
<form name="login" method="POST" action="{{ url_for('home') }}">
|
||||
{{ render_field_label(authentication_form.username) }}
|
||||
{{ render_field_label(authentication_form.password) }}
|
||||
{{ render_field_label(authentication_form.open) }}
|
||||
{{ render_field_label(authentication_form.close) }}
|
||||
<hr/>
|
||||
{{ render_field(authentication_form.open) }}
|
||||
{{ render_field(authentication_form.close) }}
|
||||
{{ authentication_form.csrf_token }}
|
||||
</form>
|
||||
{% if response %}
|
||||
@ -50,6 +52,5 @@
|
||||
{% endif %}
|
||||
<hr/>
|
||||
Die Kitchen ist: {{ state_text }}
|
||||
{{ state_img }}
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user