Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
a0afc9fc
Unverified
Commit
a0afc9fc
authored
Aug 11, 2020
by
Serge S. Koval
Committed by
GitHub
Aug 11, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2017 from TitaniumHocker/bootstrap4
Fixed file upload field markup for bs4
parents
0565efd3
be1a3341
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
upload.py
flask_admin/form/upload.py
+2
-0
lib.html
flask_admin/templates/bootstrap4/admin/lib.html
+2
-0
No files found.
flask_admin/form/upload.py
View file @
a0afc9fc
...
@@ -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>'
...
...
flask_admin/templates/bootstrap4/admin/lib.html
View file @
a0afc9fc
...
@@ -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 %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment