[*] BO: add a save and stay button in CMS edit page

This button was missing to edit easily CMS pages.
This commit is contained in:
DrÿSs
2013-02-22 15:47:50 +01:00
parent 4d83665ca1
commit 75e5eab23e
+7
View File
@@ -73,6 +73,11 @@ class AdminCmsControllerCore extends AdminController
'href' => '#',
'desc' => $this->l('Save and preview')
);
$this->toolbar_btn['save-and-stay'] = array(
'short' => 'SaveAndStay',
'href' => '#',
'desc' => $this->l('Save and stay'),
);
$this->initToolbar();
if (!$this->loadObject(true))
return;
@@ -325,6 +330,8 @@ class AdminCmsControllerCore extends AdminController
}
Tools::redirectAdmin($preview_url);
}
elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay'))
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&update'.$this->table.'&token='.$this->token;
else
Tools::redirectAdmin(self::$currentIndex.'&id_cms_category='.$cms->id_cms_category.'&conf=4&token='.Tools::getAdminTokenLite('AdminCmsContent'));
}