// #PSFV-94 : replace back link with cancel button in the toolbar on all admin controllers

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9876 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dSevere
2011-11-04 10:21:23 +00:00
parent 04cf1350fc
commit 64e62fa338
5 changed files with 17 additions and 40 deletions
+15
View File
@@ -738,10 +738,25 @@ class AdminControllerCore extends Controller
// @todo defining default buttons
case 'add':
case 'edit':
// Default save button - action dynamically handled in javascript
$this->toolbar_btn['save'] = array(
'href' => '#',
'desc' => $this->l('Save')
);
case 'view':
// Default cancel button - like old back link
if (!isset($this->no_back) || $this->no_back == false)
{
$back = Tools::safeOutput(Tools::getValue('back', ''));
if (empty($back))
$back = self::$currentIndex.'&token='.$this->token;
$this->toolbar_btn['cancel'] = array(
'href' => $back,
'desc' => $this->l('Cancel')
);
}
break;
case 'options':
break;