From bb3898f5f3ee0d12c4c87c8b297233934f591f30 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 5 Dec 2011 23:42:49 +0000 Subject: [PATCH] Fix the formfield template --- app/formtools/templates/formtools/formfield.html | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/formtools/templates/formtools/formfield.html b/app/formtools/templates/formtools/formfield.html index 7da5256..165913f 100644 --- a/app/formtools/templates/formtools/formfield.html +++ b/app/formtools/templates/formtools/formfield.html @@ -1,16 +1,11 @@ {% load add_class %} -
+
{{ field.label_tag }}
- {% if field.errors %} - {% if class %}{{ field|add_class:class|add_class:"error" }}{% else %}{{ field|add_class:"error" }}{% endif %} - {% else %} - {% if class %}{{ field|add_class:class }}{% else %}{{ field}}{% endif %} - {% endif %} - {% if field.help_text %} - {{ field.help_text }} - {% endif %} + {% if class %}{{ field|add_class:class }}{% else %}{{ field}}{% endif %} + {% if field.help_text %}{{ field.help_text }}{% endif %} + {% if field.errors %}{% for error in field.errors %}{{ error }} {% endfor %}{% endif %}