Skip to content

Commit

Permalink
Fix rendering of FileFields when form_type is 'horizontal'.
Browse files Browse the repository at this point in the history
  • Loading branch information
birdhackor committed Nov 7, 2014
1 parent 922b12a commit f5f7c73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flask_bootstrap/templates/bootstrap/wtf.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@
" col-%s-%s" % horizontal_columns[0:2]
))|safe}}
<div class=" col-{{horizontal_columns[0]}}-{{horizontal_columns[2]}}">
{{field(class="form-control", **kwargs)|safe}}
{% if field.type == 'FileField' %}
{{field(**kwargs)|safe}}
{% else %}
{{field(class="form-control", **kwargs)|safe}}
{% endif %}
</div>
{%- if field.errors %}
{%- for error in field.errors %}
Expand Down

0 comments on commit f5f7c73

Please sign in to comment.