From 6dc0f4c98f3ec1353e1671d86cf6ad594c62f572 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 21 Mar 2016 21:43:25 +0100 Subject: [PATCH] Improve forms. --- templates/_helpers.html | 2 +- templates/create.html | 4 ++-- templates/edit.html | 4 ++-- templates/login.html | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/_helpers.html b/templates/_helpers.html index 71a4f54..f2b2214 100644 --- a/templates/_helpers.html +++ b/templates/_helpers.html @@ -1,3 +1,3 @@ {% macro render_field(field) %} -
{{ field.label(class_="control-label") }}{{ field(class_="form-control") }}{% for error in field.errors %}[ {{ error }} ]{% endfor %}
+
{{ field.label(class_="control-label col-sm-2") }}
{{ field(class_="form-control") }}
{% for error in field.errors %}[ {{ error }} ]{% endfor %}
{%- endmacro %} diff --git a/templates/create.html b/templates/create.html index 6696a5c..0c26d78 100644 --- a/templates/create.html +++ b/templates/create.html @@ -4,7 +4,7 @@ -
+ {{ form.hidden_tag() }} {{ render_field(form.user) }} {{ render_field(form.uid) }} @@ -12,6 +12,6 @@ {{ render_field(form.gn) }} {{ render_field(form.pwd1) }} {{ render_field(form.pwd2) }} -
{{ form.submit(class_="btn btn-primary") }}
+
{{ form.submit(class_="btn btn-primary") }}
{% endblock %} diff --git a/templates/edit.html b/templates/edit.html index 96b2c3b..e7a1084 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -4,11 +4,11 @@ -
+ {{ form.hidden_tag() }} {{ render_field(form.user) }} {{ render_field(form.pwd1) }} {{ render_field(form.pwd2) }} -
{{ form.submit(class_="btn btn-primary") }}
+
{{ form.submit(class_="btn btn-primary") }}
{% endblock %} diff --git a/templates/login.html b/templates/login.html index 8a52e08..8077bc5 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,10 +1,10 @@ {% from "_helpers.html" import render_field %} {% extends "_base.html" %} {% block content %} -
+ {{ form.hidden_tag() }} {{ render_field(form.user) }} {{ render_field(form.pswd) }} -
{{ form.submit(class_="btn btn-primary") }}
+
{{ form.submit(class_="btn btn-primary") }}
{% endblock %}