// Fix displaying of customer group on admincustomers

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12994 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-02-03 15:59:32 +00:00
parent ce35fc7311
commit efa10195d6
+24 -21
View File
@@ -366,14 +366,6 @@ class AdminCustomersControllerCore extends AdminController
), ),
'desc' => $this->l('Customer will receive your ads via e-mail') 'desc' => $this->l('Customer will receive your ads via e-mail')
), ),
array(
'type' => 'group',
'label' => $this->l('Group access:'),
'name' => 'groupBox',
'values' => $groups,
'required' => true,
'desc' => $this->l('Check all the box(es) of groups of which the customer is to be a member')
)
) )
); );
@@ -387,19 +379,30 @@ class AdminCustomersControllerCore extends AdminController
unset($groups[$key]); unset($groups[$key]);
} }
$this->fields_form['input'][] = $this->fields_form['input'] = array_merge($this->fields_form['input'],
array( array(
'type' => 'select', array(
'label' => $this->l('Default group:'), 'type' => 'group',
'name' => 'id_default_group', 'label' => $this->l('Group access:'),
'options' => array( 'name' => 'groupBox',
'query' => $groups, 'values' => $groups,
'id' => 'id_group', 'required' => true,
'name' => 'name' 'desc' => $this->l('Check all the box(es) of groups of which the customer is to be a member')
), ),
'hint' => $this->l('The group will be as applied by default.'), array(
'desc' => $this->l('Apply the discount\'s price of this group.') 'type' => 'select',
); 'label' => $this->l('Default group:'),
'name' => 'id_default_group',
'options' => array(
'query' => $groups,
'id' => 'id_group',
'name' => 'name'
),
'hint' => $this->l('The group will be as applied by default.'),
'desc' => $this->l('Apply the discount\'s price of this group.')
)
)
);
// if customer is a guest customer, password hasn't to be there // if customer is a guest customer, password hasn't to be there
if ($obj->id && ($obj->is_guest && $obj->id_default_group == Configuration::get('PS_GUEST_GROUP'))) if ($obj->id && ($obj->is_guest && $obj->id_default_group == Configuration::get('PS_GUEST_GROUP')))