From 650b4e4158f6cc29232a7d083ab3302e2b1abcac Mon Sep 17 00:00:00 2001 From: Yusei Tahara <yusei@nexedi.com> Date: Thu, 29 Nov 2007 12:56:15 +0000 Subject: [PATCH] 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 --- .../portal_skins/erp5_core/Predicate_edit.xml | 49 ++++++++++--------- .../ERP5/bootstrap/erp5_core/bt/change_log | 3 ++ product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_edit.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_edit.xml index d28eae1f64..ca6aec4673 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_edit.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_edit.xml @@ -3,11 +3,8 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <tuple> - <string>Products.PythonScripts.PythonScript</string> - <string>PythonScript</string> - </tuple> - <none/> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> </tuple> </pickle> <pickle> @@ -68,17 +65,15 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string encoding="cdata"><![CDATA[ - -# Updates attributes of an Zope document\n + <value> <string># Updates attributes of an Zope document\n # which is in a class inheriting from ERP5 Base\n #\n # TODO\n # - Implement validation of matrix fields\n # - Implement validation of list fields\n #\n -\n from Products.Formulator.Errors import ValidationError, FormValidationError\n +from ZTUtils import make_query\n \n request=context.REQUEST\n \n @@ -121,24 +116,28 @@ except FormValidationError, validation_errors:\n return form(request)\n else:\n if not selection_index:\n - redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n - , form_id\n - , \'portal_status_message=Data+Updated.\'\n - )\n + redirect_url = \'%s/%s?%s\' % (\n + context.absolute_url(),\n + form_id,\n + make_query({\'ignore_layout\':ignore_layout,\n + \'editable_mode\':editable_mode,\n + \'portal_status_message\':\'Data Updated.\',\n + })\n + )\n else:\n - redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&%s\' % ( context.absolute_url()\n - , form_id\n - , selection_index\n - , selection_name\n - , \'portal_status_message=Data+Updated.\'\n - )\n -\n -\n + redirect_url = \'%s/%s?%s\' % (\n + context.absolute_url(),\n + form_id,\n + make_query({\'selection_index\':selection_index,\n + \'selection_name\':selection_name,\n + \'ignore_layout\':ignore_layout,\n + \'editable_mode\':editable_mode,\n + \'portal_status_message\':\'Data Updated.\',\n + })\n + )\n \n request[ \'RESPONSE\' ].redirect( redirect_url )\n - - -]]></string> </value> +</string> </value> </item> <item> <key> <string>_code</string> </key> @@ -188,6 +187,8 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n <string>Products.Formulator.Errors</string> <string>ValidationError</string> <string>FormValidationError</string> + <string>ZTUtils</string> + <string>make_query</string> <string>_getattr_</string> <string>context</string> <string>request</string> diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log index 4f6c1d369e..c54606c013 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/change_log +++ b/product/ERP5/bootstrap/erp5_core/bt/change_log @@ -1,3 +1,6 @@ +2007-11-29 yusei +* Fixed Predicate_edit to use ignore_layout and editable_mode parameters in redirect url. + 2007-11-19 yusei * Switch off acquire_local_roles on Simulation Movement. diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 73623d101c..e88ff725aa 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -600 \ No newline at end of file +602 \ No newline at end of file -- 2.30.9