// Tree bugs
This commit is contained in:
@@ -139,7 +139,7 @@ class HelperFormCore extends Helper
|
|||||||
|
|
||||||
case 'shop' :
|
case 'shop' :
|
||||||
$disable_shops = isset($params['disable_shared']) ? $params['disable_shared'] : false;
|
$disable_shops = isset($params['disable_shared']) ? $params['disable_shared'] : false;
|
||||||
$params['html'] = $this->renderAssoShop($params['tree'], $disable_shops);
|
$params['html'] = $this->renderAssoShop($disable_shops);
|
||||||
if (Shop::getTotalShops(false) == 1)
|
if (Shop::getTotalShops(false) == 1)
|
||||||
unset($this->fields_form[$fieldset_key]['form']['input'][$key]);
|
unset($this->fields_form[$fieldset_key]['form']['input'][$key]);
|
||||||
break;
|
break;
|
||||||
@@ -234,8 +234,7 @@ class HelperFormCore extends Helper
|
|||||||
$nb_shop += count($value['shops']);
|
$nb_shop += count($value['shops']);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
$tree = new HelperTreeShops($params['id'],
|
$tree = new HelperTreeShops('shop-tree', 'Shops');
|
||||||
isset($params['title']) ? $params['title'] : null);
|
|
||||||
$tree->setSelectedShops($assos);
|
$tree->setSelectedShops($assos);
|
||||||
return $tree->render();
|
return $tree->render();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
class HelperTreeShopsCore extends TreeCore
|
class HelperTreeShopsCore extends TreeCore
|
||||||
{
|
{
|
||||||
const DEFAULT_TEMPLATE = 'tree_shops.tpl';
|
const DEFAULT_TEMPLATE = 'tree_shops.tpl';
|
||||||
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_checkbox.tpl';
|
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_checkbox_shops.tpl';
|
||||||
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_checkbox.tpl';
|
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_checkbox_shops.tpl';
|
||||||
|
|
||||||
private $_lang;
|
private $_lang;
|
||||||
private $_selected_shops;
|
private $_selected_shops;
|
||||||
|
|||||||
@@ -484,10 +484,6 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
if (Shop::isFeatureActive())
|
if (Shop::isFeatureActive())
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'shop',
|
'type' => 'shop',
|
||||||
'tree' => array(
|
|
||||||
'id' => 'shops-tree',
|
|
||||||
'title' => 'Shop'
|
|
||||||
),
|
|
||||||
'label' => $this->l('Shop association:'),
|
'label' => $this->l('Shop association:'),
|
||||||
'name' => 'checkBoxShopAsso',
|
'name' => 'checkBoxShopAsso',
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user