From c15b95e40e1ba06a3e6ed26863d1a4759f28669a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 1 Sep 2010 08:14:01 +0000 Subject: [PATCH] Works on canvas integration in third party module --- .../societe/canvas/default/thirdparty.default.class.php | 9 ++++++--- htdocs/societe/class/societe.class.php | 6 ------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/htdocs/societe/canvas/default/thirdparty.default.class.php b/htdocs/societe/canvas/default/thirdparty.default.class.php index 8d9f94c1e58..03e4db627e2 100644 --- a/htdocs/societe/canvas/default/thirdparty.default.class.php +++ b/htdocs/societe/canvas/default/thirdparty.default.class.php @@ -82,10 +82,13 @@ class ThirdPartyDefault extends Societe $form = new Form($db); - // Confirm delete third party - if ($_GET["action"] == 'delete') + if ($action == 'view') { - $this->tpl['action_delete']=$form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,2); + // Confirm delete third party + if ($_GET["action"] == 'delete') + { + $this->tpl['action_delete']=$form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,2); + } } } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 90d11483986..963c95ed76a 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2146,12 +2146,6 @@ class Societe extends CommonObject if ($action == 'view') { - // Confirm delete third party - if ($_GET["action"] == 'delete') - { - $this->tpl['action_delete']=$form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,2); - } - $this->tpl['showrefnav'] = $form->showrefnav($this,'socid','',($user->societe_id?0:1),'rowid','nom'); $this->tpl['checkcustomercode'] = $this->check_codeclient();