From f5f7c736381a2cbd5a712947b694cb051fbfd185 Mon Sep 17 00:00:00 2001 From: birdhackor Date: Fri, 7 Nov 2014 03:00:37 -0500 Subject: [PATCH] Fix rendering of FileFields when form_type is 'horizontal'. --- flask_bootstrap/templates/bootstrap/wtf.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flask_bootstrap/templates/bootstrap/wtf.html b/flask_bootstrap/templates/bootstrap/wtf.html index 96ac0f7c..23be7d80 100644 --- a/flask_bootstrap/templates/bootstrap/wtf.html +++ b/flask_bootstrap/templates/bootstrap/wtf.html @@ -92,7 +92,11 @@ " col-%s-%s" % horizontal_columns[0:2] ))|safe}}
- {{field(class="form-control", **kwargs)|safe}} + {% if field.type == 'FileField' %} + {{field(**kwargs)|safe}} + {% else %} + {{field(class="form-control", **kwargs)|safe}} + {% endif %}
{%- if field.errors %} {%- for error in field.errors %}