Commit 69cf02f1 authored by Jérome Perrin's avatar Jérome Perrin

The documentation in this file was just a copy & paste


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19808 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a62e6b1a
...@@ -31,15 +31,11 @@ from Products.Formulator.Field import ZMIField ...@@ -31,15 +31,11 @@ from Products.Formulator.Field import ZMIField
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
class ImageFieldWidget(Widget.TextWidget): class ImageFieldWidget(Widget.TextWidget):
""" """ImageField widget.
RelationStringField widget
Renders an HTML <img> element where the src is the 'default' field value.
Works like a string field but includes one buttons The 'description' field value is used as 'alt' attribute.
The image size is calculated using 'image_display'.
- one search button which updates the field and sets a relation
- creates object if not there
""" """
property_names = Widget.TextWidget.property_names + \ property_names = Widget.TextWidget.property_names + \
['image_display', 'image_format','image_resolution'] ['image_display', 'image_format','image_resolution']
...@@ -47,21 +43,24 @@ class ImageFieldWidget(Widget.TextWidget): ...@@ -47,21 +43,24 @@ class ImageFieldWidget(Widget.TextWidget):
image_display = fields.StringField('image_display', image_display = fields.StringField('image_display',
title='Image Display', title='Image Display',
description=( description=(
"The method to call to set the relation. Required."), "The display size. See ERP5.Document.Image.defaultdisplays for "
"possible values. This is only used with ERP5 Images."),
default='thumbnail', default='thumbnail',
required=1) required=1)
image_format = fields.StringField('image_format', image_format = fields.StringField('image_format',
title='Image Format', title='Image Format',
description=( description=(
"The format in which the image should be converted to."), "The format in which the image should be converted to. "
"This is only used with ERP5 Images."),
default='', default='',
required=0) required=0)
image_resolution = fields.IntegerField('image_resolution', image_resolution = fields.IntegerField('image_resolution',
title='Image Resolution', title='Image Resolution',
description=( description=(
"The format in which the image should be converted to."), "The resolution used when converting the image. "
"This is only used with ERP5 Images."),
default=75, default=75,
required=0) required=0)
......
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