[-] 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
This commit is contained in:
vChabot
2012-01-11 13:36:54 +00:00
parent 42b799a373
commit 86f52585e2

View File

@@ -850,6 +850,30 @@ class AdminCustomersControllerCore extends AdminController
'.($customer->optin ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />').
'</a>';
}
/**
* @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();
}
}