// AdminControllers fixes

This commit is contained in:
tDidierjean
2011-11-30 18:16:13 +00:00
parent 8fdc69285f
commit d019c03bb9
4 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ class AdminCartsController extends AdminController
),
'customer' => array(
'title' => $this->l('Customer'),
'width' => 80,
'width' => 'auto',
'filter_key' => 'c!lastname'
),
'total' => array(
+3 -2
View File
@@ -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
)
);
+1 -1
View File
@@ -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'));
+12 -3
View File
@@ -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));