From a5b9d435d83c1551229729cd5f1fad42224633c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 14 Mar 2008 14:14:30 +0000 Subject: [PATCH] Pass form_id when redirecting to dialog action git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19907 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../Base_redirectToDialogAction.xml | 22 ++++++++++++++----- .../bootstrap/erp5_xhtml_style/bt/revision | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml index 82e8238f94..fc8e63747f 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml @@ -65,8 +65,17 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>return container.REQUEST.RESPONSE.redirect(dialog_action_url)\n -</string> </value> + <value> <string encoding="cdata"><![CDATA[ + +if \'?\' in dialog_action_url:\n + dialog_action_url = \'%s&form_id=%s\' % (dialog_action_url, form_id)\n +else:\n + dialog_action_url = \'%s?form_id=%s\' % (dialog_action_url, form_id)\n +\n +return container.REQUEST.RESPONSE.redirect(dialog_action_url)\n + + +]]></string> </value> </item> <item> <key> <string>_code</string> </key> @@ -88,7 +97,7 @@ </item> <item> <key> <string>_params</string> </key> - <value> <string>dialog_action_url</string> </value> + <value> <string>dialog_action_url, form_id=\'\'</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -108,13 +117,14 @@ <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>1</int> </value> + <value> <int>2</int> </value> </item> <item> <key> <string>co_varnames</string> </key> <value> <tuple> <string>dialog_action_url</string> + <string>form_id</string> <string>_getattr_</string> <string>container</string> </tuple> @@ -128,7 +138,9 @@ <item> <key> <string>func_defaults</string> </key> <value> - <none/> + <tuple> + <string></string> + </tuple> </value> </item> <item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 84ccffd556..eed0d1a4ad 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -505 \ No newline at end of file +506 \ No newline at end of file -- 2.30.9