From aea6d577cbf4d937427dea173f74fb17ad45bd75 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sat, 19 Nov 2011 23:46:42 +0100 Subject: [PATCH] Change form structure and add relevant CSS rules --- mediagoblin/static/css/base.css | 6 +++++- mediagoblin/templates/mediagoblin/utils/wtforms.html | 12 +++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index afd10207..a7b659c3 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -212,7 +212,11 @@ text-align: center; width: 100%; } -.form_field_label,.form_field_input { +.form_field_input { + margin-bottom: 10px; +} + +.form_field_label { margin-bottom: 4px; } diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html index 6a86fd24..39dca7cc 100644 --- a/mediagoblin/templates/mediagoblin/utils/wtforms.html +++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html @@ -18,18 +18,16 @@ {# Generically render a field #} {% macro render_field_div(field) %} -
-
{{ _(field.label.text) }}
-
{{ field }}
+

+
+ {{ field }} {%- if field.errors -%} {% for error in field.errors %} -
- {{ error }} -
+

{{ error }}

{% endfor %} {%- endif %} {% if field.description -%} -
{{ _(field.description) }}
+

{{ _(field.description) }}

{%- endif %}
{%- endmacro %} -- 2.25.1