Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aaron Chen
erp5
Commits
0e500238
Commit
0e500238
authored
Sep 19, 2011
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not pass unnecessary parameters to image.convert
This allows ImageField to return original image content
parent
9f8c7c28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
product/ERP5Form/ImageField.py
product/ERP5Form/ImageField.py
+6
-2
No files found.
product/ERP5Form/ImageField.py
View file @
0e500238
...
@@ -133,8 +133,12 @@ class ImageFieldWidget(Widget.TextWidget):
...
@@ -133,8 +133,12 @@ class ImageFieldWidget(Widget.TextWidget):
image_object
=
field
.
getPortalObject
().
restrictedTraverse
(
path
)
image_object
=
field
.
getPortalObject
().
restrictedTraverse
(
path
)
display
=
field
.
get_value
(
'image_display'
)
display
=
field
.
get_value
(
'image_display'
)
format
=
field
.
get_value
(
'image_format'
)
format
=
field
.
get_value
(
'image_format'
)
image_parameter_dict
=
{
'display'
:
display
,
resolution
=
field
.
get_value
(
'image_resolution'
)
'format'
:
format
}
image_parameter_dict
=
{
'format'
:
format
}
if
display
:
image_parameter_dict
[
'display'
]
=
display
if
resolution
:
image_parameter_dict
[
'resolution'
]
=
resolution
# convert the image using fields parameters. In this way, if an image
# convert the image using fields parameters. In this way, if an image
# is displayed in the form as a thumbnail, it will be added in the odg
# is displayed in the form as a thumbnail, it will be added in the odg
# document as thumbnail size/quality
# document as thumbnail size/quality
...
...
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