From 557a14d4d28840d4222c29f5ef73aa5f3ea61925 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 --- .../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(); + } }