[Erp5-report] r19801 - /erp5/trunk/products/ERP5Form/ImageField.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 11 16:34:15 CET 2008


Author: fabien
Date: Tue Mar 11 16:34:15 2008
New Revision: 19801

URL: http://svn.erp5.org?rev=19801&view=rev
Log:
bring some correction : get_value is better because getDescription dont take
TALES into account. get_value render field or TALES content, so we can use
description field to describe the type of content (Identity Picture) or the
content the content (John Simth). If no description is given, the title (wich
is mandatory) is used.

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=19801&r1=19800&r2=19801&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ImageField.py (original)
+++ erp5/trunk/products/ERP5Form/ImageField.py Tue Mar 11 16:34:15 2008
@@ -75,7 +75,8 @@
         """
         # Url is already defined in value
         image = value
-        description = field.getDescription() or 'field_description'
+        description = field.get_value('description') or \
+                      field.get_value('title')
         display = field.get_value('image_display')
         format = field.get_value('image_format')
         resolution = field.get_value('image_resolution')




More information about the Erp5-report mailing list