Commit 3cd40639 authored by Nicolas Delaby's avatar Nicolas Delaby

replace text_format by content_type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35290 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 03734256
......@@ -68,8 +68,6 @@ def buildAttachmentDictList(document_list, document_type_list=()):
# is not (yet) part of Document API
if getattr(attachment, 'getContentType', None) is not None:
mime_type = attachment.getContentType()
elif getattr(attachment, 'getTextFormat', None) is not None:
mime_type = attachment.getTextFormat()
else:
raise ValueError, "Cannot find mimetype of the document."
......@@ -350,7 +348,7 @@ class NotificationTool(BaseTool):
event.setSourceValue(from_person)
event.setDestinationValueList(to_person_list)
event.setTitle(subject)
event.setTextFormat(message_text_format)
event.setContentType(message_text_format)
event.setTextContent(message)
event.setAggregateValueList(attachment_document_list)
event_list.append(event)
......
......@@ -196,7 +196,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create an event
event = self.event_module.newContent(portal_type='Note')
text_content = """<p>Hé Hé\nHo Ho\nHi Hi</p>"""
event.setTextFormat('text/html')
event.setContentType('text/html')
event.setTextContent(text_content)
# Set FCKEditor as preferred editor and make sure it is taken into account
......@@ -226,7 +226,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create an event
event = self.event_module.newContent(portal_type='Note')
text_content = """Hé Hé\nHo Ho\nHi Hi"""
event.setTextFormat('text/plain')
event.setContentType('text/plain')
event.setTextContent(text_content)
# Set FCKEditor as preferred editor and make sure text_area is used since
......@@ -257,7 +257,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create an event
event = self.event_module.newContent(portal_type='Note')
text_content = """<p>Hé Hé\nHo Ho\nHi Hi</p>"""
event.setTextFormat('text/html')
event.setContentType('text/html')
event.setTextContent(text_content)
# Set TextArea as preferred editor and make sure it is taken into account
......@@ -288,7 +288,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create an event
event = self.event_module.newContent(portal_type='Note')
text_content = """Hé Hé\nHo Ho\nHi Hi"""
event.setTextFormat('text/plain')
event.setContentType('text/plain')
event.setTextContent(text_content)
# Set TextArea as preferred editor and make sure it is taken into account
......@@ -316,7 +316,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create a web page
page = self.web_page_module.newContent(portal_type='Web Page')
text_content = """<p>Hé Hé\nHo Ho\nHi Hi</p>"""
page.setTextFormat('text/html')
page.setContentType('text/html')
page.setTextContent(text_content)
# Set FCKEditor as preferred editor and make sure it is taken into account
......@@ -338,7 +338,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create a web page
page = self.web_page_module.newContent(portal_type='Web Page')
text_content = """Hé Hé\nHo Ho\nHi Hi"""
page.setTextFormat('text/plain')
page.setContentType('text/plain')
page.setTextContent(text_content)
# Set FCKEditor as preferred editor and make sure it is taken into account
......@@ -360,7 +360,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create a web page
page = self.web_page_module.newContent(portal_type='Web Page')
text_content = """<p>Hé Hé\nHo Ho\nHi Hi</p>"""
page.setTextFormat('text/html')
page.setContentType('text/html')
page.setTextContent(text_content)
# Set TextArea as preferred editor and make sure it is taken into account
......@@ -382,7 +382,7 @@ class TestEditorField(ERP5TypeTestCase, ZopeTestCase.Functional):
# Create a web page
page = self.web_page_module.newContent(portal_type='Web Page')
text_content = """Hé Hé\nHo Ho\nHi Hi"""
page.setTextFormat('text/plain')
page.setContentType('text/plain')
page.setTextContent(text_content)
# Set TextArea as preferred editor and make sure it is taken into account
......
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