From 0731890ea8aad8882c249606eb56dfe6622f5513 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Fri, 9 Mar 2012 14:21:31 +0000 Subject: [PATCH] // Fix toolbar in AdminWebservices git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14010 b9a71923-0436-4b27-9f14-aed3839534dd --- .../admin/AdminWebserviceController.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/controllers/admin/AdminWebserviceController.php b/controllers/admin/AdminWebserviceController.php index d22c40e30..48a634db7 100755 --- a/controllers/admin/AdminWebserviceController.php +++ b/controllers/admin/AdminWebserviceController.php @@ -29,6 +29,7 @@ class AdminWebserviceControllerCore extends AdminController { /** this will be filled later */ public $fields_form = array('webservice form'); + protected $toolbar_scroll = false; public function __construct() { @@ -176,6 +177,37 @@ class AdminWebserviceControllerCore extends AdminController parent::initContent(); } + /** + * Function used to render the options for this controller + */ + public function renderOptions() + { + if ($this->options && is_array($this->options)) + { + $helper = new HelperOptions($this); + $this->setHelperDisplay($helper); + $helper->toolbar_scroll = true; + $helper->toolbar_btn = array('save' => array( + 'href' => '#', + 'desc' => $this->l('Save') + )); + $helper->id = $this->id; + $helper->tpl_vars = $this->tpl_option_vars; + $options = $helper->generateOptions($this->options); + + return $options; + } + } + + public function initProcess() + { + parent::initProcess(); + // This is a composite page, we don't want the "options" display mode + if ($this->display == 'options') + $this->display = ''; + } + + public function postProcess() { if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32)