// Improve AdminGroupShopController

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10323 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-11-21 09:46:01 +00:00
parent c16ca27155
commit 4abe8efd75
+28 -26
View File
@@ -155,39 +155,41 @@ class AdminGroupShopControllerCore extends AdminController
'tax_rules_group' => $this->l('Tax rules groups'), 'tax_rules_group' => $this->l('Tax rules groups'),
'zone' => $this->l('Zones'), 'zone' => $this->l('Zones'),
); );
$this->fields_import_form = array( if (!$this->object->id)
'legend' => array( $this->fields_import_form = array(
'title' => $this->l('Import data from another group shop') 'legend' => array(
), 'title' => $this->l('Import data from another group shop')
'label' => $this->l('Duplicate data from group shop'), ),
'checkbox' => array(
'type' => 'checkbox',
'label' => $this->l('Duplicate data from group shop'), 'label' => $this->l('Duplicate data from group shop'),
'name' => 'useImportData', 'checkbox' => array(
'value' => 1 'type' => 'checkbox',
), 'label' => $this->l('Duplicate data from group shop'),
'list' => array( 'name' => 'useImportData',
'type' => 'select', 'value' => 1
'name' => 'importFromShop', ),
'options' => array( 'list' => array(
'query' => Shop::getTree(), 'type' => 'select',
'name' => 'name' 'name' => 'importFromShop',
) 'options' => array(
), 'query' => Shop::getTree(),
'allcheckbox' => array( 'name' => 'name'
'type' => 'checkbox', )
'values' => $import_data ),
), 'allcheckbox' => array(
'desc' => $this->l('Use this option to associate data (products, modules, etc.) the same way as the selected shop') 'type' => 'checkbox',
); 'values' => $import_data
),
'desc' => $this->l('Use this option to associate data (products, modules, etc.) the same way as the selected shop')
);
$this->tpl_form_vars = array( $this->tpl_form_vars = array(
'disabled' => $disabled, 'disabled' => $disabled,
'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false, 'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false,
'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID(), 'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID(),
'form_import' => $this->fields_import_form
); );
if (isset($this->fields_import_form))
$this->tpl_form_vars = array_merge($this->tpl_form_vars, array('form_import' => $this->fields_import_form));
return parent::initForm(); return parent::initForm();
} }