Commit 650b4e41 authored by Yusei Tahara's avatar Yusei Tahara

2007-11-29 yusei

* Fixed Predicate_edit to use ignore_layout and editable_mode parameters in redirect url.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17901 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6cea98d2
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -68,17 +65,15 @@ ...@@ -68,17 +65,15 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string># Updates attributes of an Zope document\n
# Updates attributes of an Zope document\n
# which is in a class inheriting from ERP5 Base\n # which is in a class inheriting from ERP5 Base\n
#\n #\n
# TODO\n # TODO\n
# - Implement validation of matrix fields\n # - Implement validation of matrix fields\n
# - Implement validation of list fields\n # - Implement validation of list fields\n
#\n #\n
\n
from Products.Formulator.Errors import ValidationError, FormValidationError\n from Products.Formulator.Errors import ValidationError, FormValidationError\n
from ZTUtils import make_query\n
\n \n
request=context.REQUEST\n request=context.REQUEST\n
\n \n
...@@ -121,24 +116,28 @@ except FormValidationError, validation_errors:\n ...@@ -121,24 +116,28 @@ except FormValidationError, validation_errors:\n
return form(request)\n return form(request)\n
else:\n else:\n
if not selection_index:\n if not selection_index:\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n redirect_url = \'%s/%s?%s\' % (\n
, form_id\n context.absolute_url(),\n
, \'portal_status_message=Data+Updated.\'\n form_id,\n
)\n make_query({\'ignore_layout\':ignore_layout,\n
\'editable_mode\':editable_mode,\n
\'portal_status_message\':\'Data Updated.\',\n
})\n
)\n
else:\n else:\n
redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&%s\' % ( context.absolute_url()\n redirect_url = \'%s/%s?%s\' % (\n
, form_id\n context.absolute_url(),\n
, selection_index\n form_id,\n
, selection_name\n make_query({\'selection_index\':selection_index,\n
, \'portal_status_message=Data+Updated.\'\n \'selection_name\':selection_name,\n
)\n \'ignore_layout\':ignore_layout,\n
\n \'editable_mode\':editable_mode,\n
\n \'portal_status_message\':\'Data Updated.\',\n
})\n
)\n
\n \n
request[ \'RESPONSE\' ].redirect( redirect_url )\n request[ \'RESPONSE\' ].redirect( redirect_url )\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -188,6 +187,8 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n ...@@ -188,6 +187,8 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>Products.Formulator.Errors</string> <string>Products.Formulator.Errors</string>
<string>ValidationError</string> <string>ValidationError</string>
<string>FormValidationError</string> <string>FormValidationError</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
......
2007-11-29 yusei
* Fixed Predicate_edit to use ignore_layout and editable_mode parameters in redirect url.
2007-11-19 yusei 2007-11-19 yusei
* Switch off acquire_local_roles on Simulation Movement. * Switch off acquire_local_roles on Simulation Movement.
......
600 602
\ No newline at end of file \ 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