Commit 177979bc authored by Nicolas Delaby's avatar Nicolas Delaby

add my_content_type field in Base_viewCRMFieldLibrary

replace text_format by content_type

Keep my_text_format to not break ProxyField Dependency

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35352 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ccaab328
......@@ -147,6 +147,7 @@
<string>my_destination_project_title</string>
<string>my_source_project_title</string>
<string>your_format</string>
<string>my_content_type</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_content_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_content_type</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -58,9 +58,9 @@ from Products.ERP5Type.Log import log\n
\n
log("Event_getTextContentCorrespondToFormat is deprecated, use Event_getEditorFieldTextContent instead", level=100) # WARNING\n
\n
text_format = context.getTextFormat()\n
content_type = context.getContentType()\n
\n
if text_format == \'text/html\' and context.hasFile():\n
if content_type == \'text/html\' and context.hasFile():\n
return context.asStrippedHTML()\n
else:\n
value = context.getTextContent()\n
......@@ -111,7 +111,7 @@ else:\n
<string>log</string>
<string>_getattr_</string>
<string>context</string>
<string>text_format</string>
<string>content_type</string>
<string>value</string>
</tuple>
</value>
......
......@@ -83,7 +83,7 @@
<string>my_description</string>
<string>my_aggregate_title_list</string>
<string>attachment_list</string>
<string>my_text_format</string>
<string>my_content_type</string>
</list>
</value>
</item>
......
......@@ -12,14 +12,12 @@
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_text_format</string> </value>
<value> <string>my_content_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -76,7 +74,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_format</string> </value>
<value> <string>my_content_type</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......@@ -86,10 +84,6 @@
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Content format</string> </value>
</item>
</dictionary>
</value>
</item>
......
......@@ -54,7 +54,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string># Set preferred text format\n
context.edit(text_format = context.portal_preferences.getPreferredTextFormat())\n
context.edit(content_type=context.portal_preferences.getPreferredTextFormat())\n
</string> </value>
</item>
<item>
......
465
\ No newline at end of file
468
\ No newline at end of file
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