Commit 696a9c05 authored by Łukasz Nowak's avatar Łukasz Nowak

Implement Software Instance rename.

parent 3638ca75
......@@ -51,9 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n
if \'field_my_text_content\' in request:\n
context.edit(text_content=request[\'field_my_text_content\'])\n
return context.Base_redirect(\'view\', keep_items={\'portal_status_message\':context.Base_translateString(\'Data updated.\')})\n
if \'field_your_new_title\' in request:\n
if context.getTitle() != request[\'field_your_new_title\']:\n
context.rename(new_name=request[\'field_your_new_title\'])\n
return context.Base_redirect(\'view\', keep_items={\'portal_status_message\':context.Base_translateString(\'Renamed.\')})\n
return context.Base_redirect(\'view\', keep_items={\'portal_status_message\':context.Base_translateString(\'No changes.\')})\n
</string> </value>
</item>
<item>
......
......@@ -91,6 +91,8 @@
<string>my_reference</string>
<string>my_title</string>
<string>your_status</string>
<string>your_new_title</string>
<string>my_update_button</string>
</list>
</value>
</item>
......@@ -108,7 +110,6 @@
<list>
<string>your_system_message</string>
<string>my_text_content</string>
<string>my_update_button</string>
</list>
</value>
</item>
......
......@@ -80,7 +80,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Update</string> </value>
<value> <string>Rename</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -100,7 +100,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Update</string> </value>
<value> <string>Rename</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>css_class</string>
<string>default</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_new_title</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>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</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>css_class</string> </key>
<value> <string>inline</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</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>New Name</string> </value>
</item>
</dictionary>
</value>
</item>
</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: context.getTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
375
\ No newline at end of file
376
\ 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