[Erp5-report] r33920 nicolas - in /erp5/trunk/products/ERP5Form: ./ tests/

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Mar 19 17:19:52 CET 2010


Author: nicolas
Date: Fri Mar 19 17:19:51 2010
New Revision: 33920

URL: http://svn.erp5.org?rev=33920&view=rev
Log:
revert r33918

Modified:
    erp5/trunk/products/ERP5Form/EditorField.py
    erp5/trunk/products/ERP5Form/tests/testFields.py

Modified: erp5/trunk/products/ERP5Form/EditorField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/EditorField.py?rev=33920&r1=33919&r2=33920&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/EditorField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/EditorField.py [utf8] Fri Mar 19 17:19:51 2010
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 ##############################################################################
 #
 # Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
@@ -90,14 +89,8 @@
       Render form in view only mode.
     """
     if value is None:
-      return ''
-    text_editor = field.get_value('text_editor')
-    if text_editor == 'text_area':
-      return Widget.TextAreaWidget.render_view(self, field, value,
-                                               REQUEST=REQUEST,
-                                               render_prefix=REQUEST)
-    else:
-      return value
+      value = ''
+    return value
 
 EditorWidgetInstance = EditorWidget()
 

Modified: erp5/trunk/products/ERP5Form/tests/testFields.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/tests/testFields.py?rev=33920&r1=33919&r2=33920&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/tests/testFields.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/tests/testFields.py [utf8] Fri Mar 19 17:19:51 2010
@@ -49,7 +49,7 @@
 from Products.ERP5Form.Form import purgeFieldValueCache
 from Products.ERP5Form.Form import getFieldValue
 from Products.ERP5Form import Form
-from Products.ERP5Form import ProxyField, EditorField
+from Products.ERP5Form import ProxyField
 from DateTime import DateTime
 
 from Products.Formulator.Widget import NSMAP
@@ -296,18 +296,6 @@
     test_value = self.field.render_odg(as_string=False)\
       .xpath('%s/text:tab' % ODG_XML_WRAPPING_XPATH, namespaces=NSMAP)
     self.assertTrue(test_value)
-
-class TestEditorField(TestTextAreaField):
-  """Tests Editor field
-  """
-
-  def getTitle(self):
-    return "Editor Field"
-
-  def afterSetUp(self):
-    self.field = EditorField.EditorField('test_field')
-    self.widget = self.field.widget
-
 
 class TestLinesField(ERP5TypeTestCase):
 
@@ -815,7 +803,6 @@
   suite.addTest(unittest.makeSuite(TestStringField))
   suite.addTest(unittest.makeSuite(TestDateTimeField))
   suite.addTest(unittest.makeSuite(TestTextAreaField))
-  suite.addTest(unittest.makeSuite(TestEditorField))
   suite.addTest(unittest.makeSuite(TestLinesField))
   suite.addTest(unittest.makeSuite(TestCheckBoxField))
   suite.addTest(unittest.makeSuite(TestListField))




More information about the Erp5-report mailing list