Unverified Commit a0afc9fc authored by Serge S. Koval's avatar Serge S. Koval Committed by GitHub

Merge pull request #2017 from TitaniumHocker/bootstrap4

Fixed file upload field markup for bs4
parents 0565efd3 be1a3341
......@@ -39,6 +39,7 @@ class FileUploadInput(object):
look and feel.
"""
empty_template = ('<input %(file)s>')
input_type = 'file'
data_template = ('<div>'
' <input %(text)s>'
......@@ -80,6 +81,7 @@ class ImageUploadInput(object):
look and feel.
"""
empty_template = ('<input %(file)s>')
input_type = 'file'
data_template = ('<div class="image-thumbnail">'
' <img %(image)s>'
......
......@@ -137,6 +137,8 @@
{% endif %}
{% if field.widget.input_type == 'checkbox' %}
{% set _class = kwargs.setdefault('class', 'form-control-lg') %}
{% elif field.widget.input_type == 'file' %}
{% set _class = kwargs.setdefault('class', 'form-control-file') %}
{% else %}
{% set _class = kwargs.setdefault('class', 'form-control') %}
{% 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