// AdminControllers fixes
This commit is contained in:
@@ -56,7 +56,7 @@ class AdminCartsController extends AdminController
|
|||||||
),
|
),
|
||||||
'customer' => array(
|
'customer' => array(
|
||||||
'title' => $this->l('Customer'),
|
'title' => $this->l('Customer'),
|
||||||
'width' => 80,
|
'width' => 'auto',
|
||||||
'filter_key' => 'c!lastname'
|
'filter_key' => 'c!lastname'
|
||||||
),
|
),
|
||||||
'total' => array(
|
'total' => array(
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class AdminGendersController extends AdminController
|
|||||||
),
|
),
|
||||||
'name' => array(
|
'name' => array(
|
||||||
'title' => $this->l('Name'),
|
'title' => $this->l('Name'),
|
||||||
'width' => 150,
|
'width' => 'auto',
|
||||||
'filter_key' => 'b!name'
|
'filter_key' => 'b!name'
|
||||||
),
|
),
|
||||||
'type' => array(
|
'type' => array(
|
||||||
@@ -82,7 +82,8 @@ class AdminGendersController extends AdminController
|
|||||||
'align' => 'center',
|
'align' => 'center',
|
||||||
'image' => 'genders',
|
'image' => 'genders',
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'search' => false
|
'search' => false,
|
||||||
|
'width' => 40
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class AdminGroupsController extends AdminController
|
|||||||
|
|
||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
'id_group' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
'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'),
|
'reduction' => array('title' => $this->l('Discount'), 'width' => 50, 'align' => 'right'),
|
||||||
'nb' => array('title' => $this->l('Members'), 'width' => 25, 'align' => 'center'),
|
'nb' => array('title' => $this->l('Members'), 'width' => 25, 'align' => 'center'),
|
||||||
'date_add' => array('title' => $this->l('Creation date'), 'width' => 60, 'type' => 'date', 'align' => 'right'));
|
'date_add' => array('title' => $this->l('Creation date'), 'width' => 60, 'type' => 'date', 'align' => 'right'));
|
||||||
|
|||||||
@@ -85,18 +85,27 @@ class AdminPaymentControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
|
{
|
||||||
|
if ($this->action)
|
||||||
|
$this->saveRestrictions($this->action);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initProcess()
|
||||||
{
|
{
|
||||||
if ($this->tabAccess['edit'] === '1')
|
if ($this->tabAccess['edit'] === '1')
|
||||||
{
|
{
|
||||||
if (Tools::isSubmit('submitModulecountry'))
|
if (Tools::isSubmit('submitModulecountry'))
|
||||||
$this->saveRestrictions('country');
|
$this->action = 'country';
|
||||||
else if (Tools::isSubmit('submitModulecurrency'))
|
else if (Tools::isSubmit('submitModulecurrency'))
|
||||||
$this->saveRestrictions('currency');
|
$this->action ='currency';
|
||||||
else if (Tools::isSubmit('submitModulegroup'))
|
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)
|
private function saveRestrictions($type)
|
||||||
{
|
{
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_'.bqSQL($type).'` WHERE id_shop = '.Context::getContext()->shop->getID(true));
|
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_'.bqSQL($type).'` WHERE id_shop = '.Context::getContext()->shop->getID(true));
|
||||||
|
|||||||
Reference in New Issue
Block a user