Commit 6670a490 authored by Rafael Monnerat's avatar Rafael Monnerat

Improve Image handling on SlideShow Editor and compatibitlity with Web Page.

parent e6a7601b
......@@ -61,6 +61,9 @@ from Products.ERP5Type.Document import newTempBase\n
translateString = context.Base_translateString\n
portal_status_message = ""\n
\n
if image_caption in [None, ""]:\n
image_caption = chapter_title\n
\n
session = context.ERP5RunMyDocs_acquireSession()\n
if session.has_key(\'listbox\') and len(session[\'listbox\']) > 0:\n
listbox = session[\'listbox\']\n
......@@ -75,17 +78,12 @@ if slide_type in [\'Illustration\',\'Screenshot\']:\n
test_page_path = session[\'test_page_path\']\n
test_page = context.restrictedTraverse(test_page_path)\n
\n
if slide_type == \'Illustration\':\n
if slide_type in [\'Illustration\', \'Screenshot\']:\n
if image_url != "":\n
image_id = image_url\n
else:\n
image_id = test_page.TestPage_getNextImageID(chapter_title, slide_type)\n
image = test_page.TestPage_uploadImage(image_id, file, batch_mode = True)\n
\n
if slide_type == \'Screenshot\':\n
tested = True\n
image_id = test_page.TestPage_getNextImageID(chapter_title, slide_type)\n
image = test_page.TestPage_uploadImage(image_id, file, batch_mode = True)\n
image = test_page.TestPage_uploadImage(image_id, file, batch_mode=True, image_caption=image_caption)\n
\n
listbox.append(newTempBase(context.getPortalObject(),\n
\'\',\n
......@@ -93,6 +91,7 @@ listbox.append(newTempBase(context.getPortalObject(),\n
uid = str(int_index),\n
int_index = int_index,\n
image_id = image_id,\n
image_title = image_caption,\n
slide_type = slide_type,\n
text_content = text_content,\n
slide_content = slide_content,\n
......@@ -109,7 +108,7 @@ return context.Base_redirect(\'TestPageModule_viewChapterCreationWizard\', \n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>chapter_title, slide_type, image_url, file, text_content, slide_content, tested, **kw</string> </value>
<value> <string>chapter_title, slide_type, image_url, image_caption, file, text_content, slide_content, tested=False, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -51,22 +51,27 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Creates a Test Page (with no text) and generates the first chapter/slide\n
Creates a Test|Web Page (with no text) and generates the first chapter/slide\n
"""\n
\n
portal_type = \'Test Page\'\n
\n
if context.getPortalType() == "Web Page Module":\n
# This should be much more clever\n
portal_type = \'Web Page\'\n
\n
from Products.ERP5Type.Document import newTempBase\n
translateString = context.Base_translateString\n
portal_status_message = translateString("Test Page created. You can now add your first chapter.")\n
portal_status_message = translateString("%s created. You can now add your first chapter." % portal_type)\n
\n
test_page = context.newContent(portal_type = \'Test Page\',\n
title = title,\n
reference = \'\'.join(c for c in (\'.\'.join(title.split(\' \'))) if c.isalnum() or c == \'.\'))\n
page = context.newContent(portal_type=portal_type,\n
title = title)\n
\n
session = context.ERP5RunMyDocs_acquireSession()\n
session[\'title\'] = title\n
session[\'author\'] = author\n
session[\'author_mail\'] = author_mail\n
session[\'test_page_path\'] = test_page.getPath()\n
session[\'test_page_path\'] = page.getPath()\n
session[\'listbox\'] = [newTempBase(context.getPortalObject(), \'\',\n
title = title,\n
uid = \'0\',\n
......
......@@ -58,7 +58,7 @@
\n
from Products.ERP5Type.Document import newTempBase\n
# Add the last chapter to the listbox\n
context.TestPageModule_createChapter(chapter_title, slide_type, image_url, \n
context.TestPageModule_createChapter(chapter_title, slide_type, image_url, image_caption,\n
file, text_content, slide_content, tested, **kw)\n
\n
translateString = context.Base_translateString\n
......@@ -105,7 +105,7 @@ for chapter in listbox[1:]:\n
<h1>"""+ title +"""</h1>"""\n
if not(image_id is None or not image_id):\n
text_content +=\'\'\'\n
<img type="image/svg+xml" alt="" src="\'\'\'+ image_id + \'\'\'?format=" width="90%"/>\'\'\'\n
<img type="image/svg+xml" title="\'\'\' + chapter.image_title + \'\'\'" alt="\'\'\' + chapter.image_title + \'\'\'" src="\'\'\'+ image_id + \'\'\'?format=" width="90%"/>\'\'\'\n
if not(slide_content is None or not slide_content):\n
text_content += """\n
"""+ slide_content\n
......@@ -166,7 +166,7 @@ return test_page.Base_redirect(\'view\', \n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>chapter_title, slide_type, image_url, file, text_content, slide_content, tested, **kw</string> </value>
<value> <string>chapter_title, slide_type, image_url, image_caption, file, text_content, slide_content, tested=False, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -87,6 +87,8 @@
<string>your_title</string>
<string>your_chapter_title</string>
<string>your_slide_type</string>
<string>your_image_explanation</string>
<string>your_image_caption</string>
<string>your_image_url</string>
<string>your_file</string>
<string>your_slide_content</string>
......
......@@ -94,7 +94,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Upload an Image</string> </value>
<value> <string>Upload an Embedded Image</string> </value>
</item>
</dictionary>
</value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>display_width</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_image_caption</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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Caption of the image that will be used when generate Books.</string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>90</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_title</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>
<item>
<key> <string>title</string> </key>
<value> <string>Image Caption (Default is Chapter Title)</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_image_explanation</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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string encoding="cdata"><![CDATA[
<br />\n
Images information will be only considered if you use Screenshot or Illustration.\n
<br />\n
If you define Image URL, the file uploaded will be ignored.
]]></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_label_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string encoding="cdata"><![CDATA[
&nbsp;
]]></string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,6 +11,7 @@
<value>
<list>
<string>description</string>
<string>enabled</string>
<string>title</string>
</list>
</value>
......@@ -53,6 +54,16 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -80,6 +91,10 @@
<key> <string>description</string> </key>
<value> <string>Check it if you want to add a sample test to this chapter.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......@@ -102,4 +117,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPortalType() == \'Test Page\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -57,7 +57,7 @@
"""\n
\n
path = context.getPath()\n
image_id = title + "_" + slide_type\n
image_id = title.lower() + "_" + slide_type.lower()\n
\n
# We replace all the whitespaces by dots\n
image_id = \'\'.join(c for c in (\'_\'.join(image_id.split(\' \'))) if c.isalnum() or c == \'_\')\n
......
......@@ -56,41 +56,38 @@
\n
translateString = context.Base_translateString\n
\n
msg = \'Slide created.\'\n
if image_caption in ["", None]:\n
image_caption = chapter_title\n
\n
if edit_mode == 1:\n
msg = \'Slide updated.\'\n
if edit_mode:\n
msg = translateString(\'Slide updated.\')\n
else:\n
msg = translateString(\'Slide created.\')\n
\n
def createImage(image_id):\n
return context.newContent(portal_type = \'Embedded File\',\n
title = image_id,\n
id = image_id,\n
reference = image_id,\n
short_title = image_id)\n
title=image_caption,\n
id=image_id)\n
\n
if slide_type in [\'Screenshot\', \'Illustration\']:\n
if edit_mode:\n
if image_id is None or not image_id:\n
image = createImage(context.TestPage_getNextImageID(chapter_title, slide_type))\n
else:\n
if slide_type in [\'Screenshot\', \'Illustration\'] and upload_image:\n
if not(file is None or not file):\n
if edit_mode:\n
try:\n
image = context.restrictedTraverse(context.getPath() + \'/\' + image_id)\n
except:\n
if not batch_mode:\n
image_id = context.TestPage_getNextImageID(chapter_title, slide_type)\n
image = createImage(image_id)\n
else:\n
if not batch_mode:\n
image_id = context.TestPage_getNextImageID(chapter_title, slide_type)\n
image = createImage(image_id)\n
msg += \' Image \' + image_id + \' created.\'\n
msg += \' Image %s created.\' % image_id\n
else:\n
image = createImage(image_id)\n
msg += \' Image %s created.\' % image_id\n
\n
if not(file is None or not file):\n
image.edit(file=file, \n
data=file.read(), \n
filename=file.filename)\n
\n
msg += \' Image uploaded.\'\n
image.edit(file=file)\n
\n
msg += \' Image content uploaded to %s.\' % image.getRelativeUrl()\n
\n
if image_caption not in ["", None]:\n
image.setTitle(image_caption)\n
\n
if batch_mode:\n
return image\n
......@@ -102,7 +99,7 @@ context.Base_redirect(form_id,\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>image_id, file, edit_mode = 0, slide_type = \'Illustration\', chapter_title = \'\', batch_mode = False, **kw</string> </value>
<value> <string>image_id, file, edit_mode = 0, slide_type = \'Illustration\', chapter_title = \'\', batch_mode = False, image_caption = None, upload_image = 1, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -95,11 +95,14 @@
<list>
<string>your_chapter_title</string>
<string>your_slide_type</string>
<string>your_image_caption</string>
<string>your_image_id</string>
<string>your_file</string>
<string>your_image_url</string>
<string>your_slide_content</string>
<string>your_text_content</string>
<string>your_tested</string>
<string>your_image_id</string>
<string>your_upload_image</string>
</list>
</value>
</item>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>display_width</string>
<string>extra</string>
<string>required</string>
</list>
</value>
......@@ -84,6 +85,10 @@
<key> <string>display_width</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string>required="required"</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
......@@ -94,7 +99,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_image_caption</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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Caption of the image that will be used when generate Books.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_title</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>
<item>
<key> <string>title</string> </key>
<value> <string>Image Caption</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -84,11 +84,11 @@
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
<value> <string>my_view_mode_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTestPageFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
......@@ -100,7 +100,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Image ID</string> </value>
<value> <string>Embedded Image ID</string> </value>
</item>
</dictionary>
</value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_image_url</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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The URL to the image, you can use relative urls or image reference.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_title</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>
<item>
<key> <string>title</string> </key>
<value> <string>Image URL</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,6 +11,7 @@
<value>
<list>
<string>description</string>
<string>enabled</string>
<string>title</string>
</list>
</value>
......@@ -53,6 +54,16 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -80,6 +91,10 @@
<key> <string>description</string> </key>
<value> <string>Check it if you want to add a sample test to this chapter.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......@@ -102,4 +117,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPortalType() == \'Test Page\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_upload_image</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>description</string> </key>
<value> <string></string> </value>
</item>
<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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Do you want to upload a new image on ERP5?</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</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>
<item>
<key> <string>title</string> </key>
<value> <string>Upload New Image?</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -95,13 +95,16 @@
<list>
<string>your_chapter_title</string>
<string>your_slide_type</string>
<string>your_image_caption</string>
<string>your_image_id</string>
<string>your_file</string>
<string>your_image_url</string>
<string>your_slide_content</string>
<string>your_text_content</string>
<string>your_tested</string>
<string>your_not_tested</string>
<string>your_image_id</string>
<string>your_edit_mode</string>
<string>your_upload_image</string>
</list>
</value>
</item>
......
......@@ -94,7 +94,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_image_caption</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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Caption of the image that will be used when generate Books.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_title</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>
<item>
<key> <string>title</string> </key>
<value> <string>Image Caption</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -12,6 +12,7 @@
<list>
<string>css_class</string>
<string>description</string>
<string>extra</string>
<string>required</string>
<string>title</string>
</list>
......@@ -82,13 +83,17 @@
<key> <string>description</string> </key>
<value> <string>Don\'t modify it manually.</string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string>readonly="readonly"</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
<value> <string>my_view_mode_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTestPageFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
......@@ -100,7 +105,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Image ID</string> </value>
<value> <string>Embedded Image ID (Read Only)</string> </value>
</item>
</dictionary>
</value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_image_url</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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The URL to the image, you can use relative urls or image reference.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_title</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>
<item>
<key> <string>title</string> </key>
<value> <string>Image URL</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
......@@ -53,6 +54,16 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -76,6 +87,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Check it if you want to remove the current test from this chapter.</string> </value>
......@@ -102,4 +117,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPortalType() == \'Web Page\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,6 +11,7 @@
<value>
<list>
<string>description</string>
<string>enabled</string>
<string>title</string>
</list>
</value>
......@@ -53,6 +54,16 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -80,6 +91,10 @@
<key> <string>description</string> </key>
<value> <string>Check it if you want to add a sample test to this chapter.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......@@ -102,4 +117,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPortalType() == \'Test Page\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_upload_image</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>description</string> </key>
<value> <string></string> </value>
</item>
<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>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Do you want to upload a new image on ERP5?</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</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>
<item>
<key> <string>title</string> </key>
<value> <string>Upload New Image?</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
42
\ No newline at end of file
43
\ 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