1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 02:14:26 +01:00

index: refactor render_field to render_field_label

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
Ralf Ramsauer 2018-03-18 15:57:13 +01:00
parent ef198b74c0
commit 1b59b273d8
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{% macro render_field(field) %}
{% macro render_field_label(field) %}
<dt>{{ field.label }}
<dd>{{ field(**kwargs)|safe }}
{% if field.errors %}

View File

@ -1,4 +1,4 @@
{% from "formhelpers.html" import render_field %}
{% from "formhelpers.html" import render_field_label %}
<!DOCTYPE html>
<html>
<head>
@ -38,10 +38,10 @@
}
</style>
<form name="login" method="POST" action="{{ url_for('home') }}">
{{ render_field(authentication_form.username) }}
{{ render_field(authentication_form.password) }}
{{ render_field(authentication_form.open) }}
{{ render_field(authentication_form.close) }}
{{ render_field_label(authentication_form.username) }}
{{ render_field_label(authentication_form.password) }}
{{ render_field_label(authentication_form.open) }}
{{ render_field_label(authentication_form.close) }}
{{ authentication_form.csrf_token }}
</form>
{% if response %}