From 1b99e3a4b005c133a55798de764c3ccb9b56a89b Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Fri, 19 Mar 2010 16:19:51 +0000 Subject: [PATCH] revert r33918 git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33920 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/EditorField.py | 11 ++--------- product/ERP5Form/tests/testFields.py | 15 +-------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/product/ERP5Form/EditorField.py b/product/ERP5Form/EditorField.py index 1a19f2b6ab..b6a5099985 100644 --- a/product/ERP5Form/EditorField.py +++ b/product/ERP5Form/EditorField.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved. @@ -90,14 +89,8 @@ class EditorWidget(Widget.TextAreaWidget): 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() diff --git a/product/ERP5Form/tests/testFields.py b/product/ERP5Form/tests/testFields.py index 1ce3a91c23..6a63b7db84 100644 --- a/product/ERP5Form/tests/testFields.py +++ b/product/ERP5Form/tests/testFields.py @@ -49,7 +49,7 @@ from Products.ERP5Form.Form import ERP5Form 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 @@ -297,18 +297,6 @@ class TestTextAreaField(ERP5TypeTestCase): .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): def getTitle(self): @@ -815,7 +803,6 @@ def test_suite(): 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)) -- 2.30.9