mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 10:24: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 %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
{% endmacro %}
|
{% 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>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -37,11 +37,13 @@
|
|||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{{ state_img }}
|
||||||
<form name="login" method="POST" action="{{ url_for('home') }}">
|
<form name="login" method="POST" action="{{ url_for('home') }}">
|
||||||
{{ render_field_label(authentication_form.username) }}
|
{{ render_field_label(authentication_form.username) }}
|
||||||
{{ render_field_label(authentication_form.password) }}
|
{{ render_field_label(authentication_form.password) }}
|
||||||
{{ render_field_label(authentication_form.open) }}
|
<hr/>
|
||||||
{{ render_field_label(authentication_form.close) }}
|
{{ render_field(authentication_form.open) }}
|
||||||
|
{{ render_field(authentication_form.close) }}
|
||||||
{{ authentication_form.csrf_token }}
|
{{ authentication_form.csrf_token }}
|
||||||
</form>
|
</form>
|
||||||
{% if response %}
|
{% if response %}
|
||||||
@ -50,6 +52,5 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<hr/>
|
<hr/>
|
||||||
Die Kitchen ist: {{ state_text }}
|
Die Kitchen ist: {{ state_text }}
|
||||||
{{ state_img }}
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user