From 1b59b273d8e7bd98edf18cf150e3da53159a37db Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Sun, 18 Mar 2018 15:57:13 +0100 Subject: [PATCH] index: refactor render_field to render_field_label Signed-off-by: Ralf Ramsauer --- doorlockd-new/templates/formhelpers.html | 2 +- doorlockd-new/templates/index.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doorlockd-new/templates/formhelpers.html b/doorlockd-new/templates/formhelpers.html index 0b6bfda..8690d30 100644 --- a/doorlockd-new/templates/formhelpers.html +++ b/doorlockd-new/templates/formhelpers.html @@ -1,4 +1,4 @@ -{% macro render_field(field) %} +{% macro render_field_label(field) %}
{{ field.label }}
{{ field(**kwargs)|safe }} {% if field.errors %} diff --git a/doorlockd-new/templates/index.html b/doorlockd-new/templates/index.html index 28d3bf5..4cc4ab5 100644 --- a/doorlockd-new/templates/index.html +++ b/doorlockd-new/templates/index.html @@ -1,4 +1,4 @@ -{% from "formhelpers.html" import render_field %} +{% from "formhelpers.html" import render_field_label %} @@ -38,10 +38,10 @@ }
- {{ 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 }}
{% if response %}