diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 005a97863..e58e35935 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -56,7 +56,7 @@ class AdminCartsController extends AdminController ), 'customer' => array( 'title' => $this->l('Customer'), - 'width' => 80, + 'width' => 'auto', 'filter_key' => 'c!lastname' ), 'total' => array( diff --git a/controllers/admin/AdminGendersController.php b/controllers/admin/AdminGendersController.php index 043129302..49e4816b5 100644 --- a/controllers/admin/AdminGendersController.php +++ b/controllers/admin/AdminGendersController.php @@ -60,7 +60,7 @@ class AdminGendersController extends AdminController ), 'name' => array( 'title' => $this->l('Name'), - 'width' => 150, + 'width' => 'auto', 'filter_key' => 'b!name' ), 'type' => array( @@ -82,7 +82,8 @@ class AdminGendersController extends AdminController 'align' => 'center', 'image' => 'genders', 'orderby' => false, - 'search' => false + 'search' => false, + 'width' => 40 ) ); diff --git a/controllers/admin/AdminGroupsController.php b/controllers/admin/AdminGroupsController.php index bd304ae66..e6347b0a5 100644 --- a/controllers/admin/AdminGroupsController.php +++ b/controllers/admin/AdminGroupsController.php @@ -51,7 +51,7 @@ class AdminGroupsController extends AdminController $this->fieldsDisplay = array( 'id_group' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), - 'name' => array('title' => $this->l('Name'), 'width' => 'auto', 'filter_key' => 'b!name'), + 'name' => array('title' => $this->l('Name'), 'width' => 80, 'filter_key' => 'b!name'), 'reduction' => array('title' => $this->l('Discount'), 'width' => 50, 'align' => 'right'), 'nb' => array('title' => $this->l('Members'), 'width' => 25, 'align' => 'center'), 'date_add' => array('title' => $this->l('Creation date'), 'width' => 60, 'type' => 'date', 'align' => 'right')); diff --git a/controllers/admin/AdminPaymentController.php b/controllers/admin/AdminPaymentController.php index e6e82c81b..2e7aae50e 100644 --- a/controllers/admin/AdminPaymentController.php +++ b/controllers/admin/AdminPaymentController.php @@ -85,18 +85,27 @@ class AdminPaymentControllerCore extends AdminController } public function postProcess() + { + if ($this->action) + $this->saveRestrictions($this->action); + } + + public function initProcess() { if ($this->tabAccess['edit'] === '1') { if (Tools::isSubmit('submitModulecountry')) - $this->saveRestrictions('country'); + $this->action = 'country'; else if (Tools::isSubmit('submitModulecurrency')) - $this->saveRestrictions('currency'); + $this->action ='currency'; else if (Tools::isSubmit('submitModulegroup')) - $this->saveRestrictions('group'); + $this->action ='group'; } + else + $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); } + private function saveRestrictions($type) { Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_'.bqSQL($type).'` WHERE id_shop = '.Context::getContext()->shop->getID(true));