Commit be1a3341 authored by Titanium Hocker's avatar Titanium Hocker

Fixed file upload field markup

parent 0565efd3
...@@ -39,6 +39,7 @@ class FileUploadInput(object): ...@@ -39,6 +39,7 @@ class FileUploadInput(object):
look and feel. look and feel.
""" """
empty_template = ('<input %(file)s>') empty_template = ('<input %(file)s>')
input_type = 'file'
data_template = ('<div>' data_template = ('<div>'
' <input %(text)s>' ' <input %(text)s>'
...@@ -80,6 +81,7 @@ class ImageUploadInput(object): ...@@ -80,6 +81,7 @@ class ImageUploadInput(object):
look and feel. look and feel.
""" """
empty_template = ('<input %(file)s>') empty_template = ('<input %(file)s>')
input_type = 'file'
data_template = ('<div class="image-thumbnail">' data_template = ('<div class="image-thumbnail">'
' <img %(image)s>' ' <img %(image)s>'
......
...@@ -137,6 +137,8 @@ ...@@ -137,6 +137,8 @@
{% endif %} {% endif %}
{% if field.widget.input_type == 'checkbox' %} {% if field.widget.input_type == 'checkbox' %}
{% set _class = kwargs.setdefault('class', 'form-control-lg') %} {% set _class = kwargs.setdefault('class', 'form-control-lg') %}
{% elif field.widget.input_type == 'file' %}
{% set _class = kwargs.setdefault('class', 'form-control-file') %}
{% else %} {% else %}
{% set _class = kwargs.setdefault('class', 'form-control') %} {% set _class = kwargs.setdefault('class', 'form-control') %}
{% endif %} {% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment