Commit 1b99e3a4 authored by Nicolas Delaby's avatar Nicolas Delaby

revert r33918

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33920 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5753fc0a
# -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -90,14 +89,8 @@ class EditorWidget(Widget.TextAreaWidget): ...@@ -90,14 +89,8 @@ class EditorWidget(Widget.TextAreaWidget):
Render form in view only mode. Render form in view only mode.
""" """
if value is None: if value is None:
return '' value = ''
text_editor = field.get_value('text_editor') return value
if text_editor == 'text_area':
return Widget.TextAreaWidget.render_view(self, field, value,
REQUEST=REQUEST,
render_prefix=REQUEST)
else:
return value
EditorWidgetInstance = EditorWidget() EditorWidgetInstance = EditorWidget()
......
...@@ -49,7 +49,7 @@ from Products.ERP5Form.Form import ERP5Form ...@@ -49,7 +49,7 @@ from Products.ERP5Form.Form import ERP5Form
from Products.ERP5Form.Form import purgeFieldValueCache from Products.ERP5Form.Form import purgeFieldValueCache
from Products.ERP5Form.Form import getFieldValue from Products.ERP5Form.Form import getFieldValue
from Products.ERP5Form import Form from Products.ERP5Form import Form
from Products.ERP5Form import ProxyField, EditorField from Products.ERP5Form import ProxyField
from DateTime import DateTime from DateTime import DateTime
from Products.Formulator.Widget import NSMAP from Products.Formulator.Widget import NSMAP
...@@ -297,18 +297,6 @@ class TestTextAreaField(ERP5TypeTestCase): ...@@ -297,18 +297,6 @@ class TestTextAreaField(ERP5TypeTestCase):
.xpath('%s/text:tab' % ODG_XML_WRAPPING_XPATH, namespaces=NSMAP) .xpath('%s/text:tab' % ODG_XML_WRAPPING_XPATH, namespaces=NSMAP)
self.assertTrue(test_value) 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): class TestLinesField(ERP5TypeTestCase):
def getTitle(self): def getTitle(self):
...@@ -815,7 +803,6 @@ def test_suite(): ...@@ -815,7 +803,6 @@ def test_suite():
suite.addTest(unittest.makeSuite(TestStringField)) suite.addTest(unittest.makeSuite(TestStringField))
suite.addTest(unittest.makeSuite(TestDateTimeField)) suite.addTest(unittest.makeSuite(TestDateTimeField))
suite.addTest(unittest.makeSuite(TestTextAreaField)) suite.addTest(unittest.makeSuite(TestTextAreaField))
suite.addTest(unittest.makeSuite(TestEditorField))
suite.addTest(unittest.makeSuite(TestLinesField)) suite.addTest(unittest.makeSuite(TestLinesField))
suite.addTest(unittest.makeSuite(TestCheckBoxField)) suite.addTest(unittest.makeSuite(TestCheckBoxField))
suite.addTest(unittest.makeSuite(TestListField)) suite.addTest(unittest.makeSuite(TestListField))
......
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