From 86f52585e293e459d9da8a438e7253dfd6a2a0fe Mon Sep 17 00:00:00 2001 From: vChabot Date: Wed, 11 Jan 2012 13:36:54 +0000 Subject: [PATCH] [-] BO : BugFix : #PSTEST-416 : display lastname and firstname on the customer delete confirmation popup git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12350 b9a71923-0436-4b27-9f14-aed3839534dd --- .../admin/AdminCustomersController.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php index 6f7dfb15f..088560de6 100644 --- a/controllers/admin/AdminCustomersController.php +++ b/controllers/admin/AdminCustomersController.php @@ -850,6 +850,30 @@ class AdminCustomersControllerCore extends AdminController '.($customer->optin ? '' : ''). ''; } + + /** + * @param string $token + * @param integer $id + * @param string $name + * @return mixed + */ + public function displayDeleteLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('helper/list/list_action_delete.tpl'); + + $customer = new Customer($id); + $name = $customer->lastname.' '.$customer->firstname; + $name = '\n\n'.$this->l('Name:', 'helper').' '.$name; + + $tpl->assign(array( + 'href' => self::$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token), + 'confirm' => $this->l('Delete selected item ?').$name, + 'action' => $this->l('Delete'), + 'id' => $id, + )); + + return $tpl->fetch(); + } }