[Erp5-report] r19808 - /erp5/trunk/products/ERP5Form/ImageField.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 12 10:08:15 CET 2008
Author: jerome
Date: Wed Mar 12 10:08:14 2008
New Revision: 19808
URL: http://svn.erp5.org?rev=19808&view=rev
Log:
The documentation in this file was just a copy & paste
Modified:
erp5/trunk/products/ERP5Form/ImageField.py
Modified: erp5/trunk/products/ERP5Form/ImageField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ImageField.py?rev=19808&r1=19807&r2=19808&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ImageField.py (original)
+++ erp5/trunk/products/ERP5Form/ImageField.py Wed Mar 12 10:08:14 2008
@@ -31,15 +31,11 @@
from Products.Formulator.DummyField import fields
class ImageFieldWidget(Widget.TextWidget):
- """
- RelationStringField widget
-
- Works like a string field but includes one buttons
-
- - one search button which updates the field and sets a relation
-
- - creates object if not there
-
+ """ImageField widget.
+
+ Renders an HTML <img> element where the src is the 'default' field value.
+ The 'description' field value is used as 'alt' attribute.
+ The image size is calculated using 'image_display'.
"""
property_names = Widget.TextWidget.property_names + \
['image_display', 'image_format','image_resolution']
@@ -47,21 +43,24 @@
image_display = fields.StringField('image_display',
title='Image Display',
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',
required=1)
image_format = fields.StringField('image_format',
title='Image Format',
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='',
required=0)
image_resolution = fields.IntegerField('image_resolution',
title='Image Resolution',
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,
required=0)
More information about the Erp5-report
mailing list