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
95477b16
Commit
95477b16
authored
Dec 05, 2016
by
Victor Gavro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image upload field: fixed for change form if file was already uploaded
parent
d1191c27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
upload.py
flask_admin/form/upload.py
+4
-0
No files found.
flask_admin/form/upload.py
View file @
95477b16
...
@@ -83,6 +83,7 @@ class ImageUploadInput(object):
...
@@ -83,6 +83,7 @@ class ImageUploadInput(object):
data_template
=
(
'<div class="image-thumbnail">'
data_template
=
(
'<div class="image-thumbnail">'
' <img
%(image)
s>'
' <img
%(image)
s>'
' <input type="checkbox" name="
%(marker)
s">Delete</input>'
' <input type="checkbox" name="
%(marker)
s">Delete</input>'
' <input
%(text)
s>'
'</div>'
'</div>'
'<input
%(file)
s>'
)
'<input
%(file)
s>'
)
...
@@ -91,6 +92,9 @@ class ImageUploadInput(object):
...
@@ -91,6 +92,9 @@ class ImageUploadInput(object):
kwargs
.
setdefault
(
'name'
,
field
.
name
)
kwargs
.
setdefault
(
'name'
,
field
.
name
)
args
=
{
args
=
{
'text'
:
html_params
(
type
=
'hidden'
,
value
=
field
.
data
,
name
=
field
.
name
),
'file'
:
html_params
(
type
=
'file'
,
'file'
:
html_params
(
type
=
'file'
,
**
kwargs
),
**
kwargs
),
'marker'
:
'_
%
s-delete'
%
field
.
name
'marker'
:
'_
%
s-delete'
%
field
.
name
...
...
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