From cb7d3c6b1d05476a1a0d1e2137f1829928547571 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Mon, 13 Oct 2008 16:31:54 +0000 Subject: [PATCH] Allow to redirect to another document when passing a workflow transition. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24162 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_xhtml_style/Workflow_statusModify.xml | 8 +++++++- product/ERP5/bootstrap/erp5_xhtml_style/bt/revision | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml index ef5c975f20..1057403176 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml @@ -125,8 +125,12 @@ except ValidationFailed, error_message:\n \n portal_status_message = request.get(\'portal_status_message\', translateString(\'Status changed.\'))\n \n +# Allow to redirect to another document\n +redirect_document_path = request.get(\'redirect_document_path\', context.getRelativeUrl())\n +redirect_document = context.restrictedTraverse(redirect_document_path)\n +\n return context.ERP5Site_redirect(\n - \'%s/%s\' % (context.absolute_url(), form_id),\n + \'%s/%s\' % (redirect_document.absolute_url(), form_id),\n keep_items={\'portal_status_message\': portal_status_message})\n </string> </value> </item> @@ -203,6 +207,8 @@ return context.ERP5Site_redirect(\n <string>same_type</string> <string>str</string> <string>portal_status_message</string> + <string>redirect_document_path</string> + <string>redirect_document</string> </tuple> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 8ec9b982c4..823aeb4b44 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -622 \ No newline at end of file +624 \ No newline at end of file -- 2.30.9