From dced62ecfb1557b74a75da58b5e6471bd2724d73 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Mon, 2 Oct 2006 17:41:33 +0000 Subject: [PATCH] Porpagate the cancel url so that calling this method from a dialog doesn't break the cancel button. Make it optionnal to avoid breaking all existing sites... git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10494 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Tool/TemplateTool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5/Tool/TemplateTool.py b/product/ERP5/Tool/TemplateTool.py index 9b39e656c7..08faa32555 100644 --- a/product/ERP5/Tool/TemplateTool.py +++ b/product/ERP5/Tool/TemplateTool.py @@ -531,8 +531,8 @@ class TemplateTool (BaseTool): if REQUEST is not None: ret_url = self.absolute_url() + '/' + REQUEST.get('dialog_id', 'view') psm = N_("Business+Templates+Updated+Successfully") - REQUEST.RESPONSE.redirect("%s?portal_status_message=%s&dialog_category=object_exchange&selection_name=business_template_selection" - % (ret_url, psm)) + REQUEST.RESPONSE.redirect("%s?cancel_url=%s&portal_status_message=%s&dialog_category=object_exchange&selection_name=business_template_selection" + % (ret_url, REQUEST.form.get('cancel_url', ''), psm)) security.declareProtected( Permissions.AccessContentsInformation, 'getRepositoryList' ) -- 2.30.9