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
be1a3341
Commit
be1a3341
authored
Aug 11, 2020
by
Titanium Hocker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed file upload field markup
parent
0565efd3
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 @
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>'
...
...
flask_admin/templates/bootstrap4/admin/lib.html
View file @
be1a3341
...
...
@@ -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 %}
...
...
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