[*] BO : #PSFV-94 - changes to helpers

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9517 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2011-10-20 15:37:26 +00:00
parent 1e9e80b266
commit 78dee05c5a
14 changed files with 231 additions and 271 deletions
@@ -23,7 +23,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{if $firstCall}
<script type="text/javascript" language="javascript" src="../js/jquery/jquery-fieldselection.js"></script>
<script type="text/javascript">
+11 -1
View File
@@ -112,7 +112,17 @@
value="{$value.value}"
{if $disabled[$input.name]}disabled="disabled"{/if}
{if $fields_value[$input.name] == $value.value}checked="checked"{/if} />
<label {if isset($input.class)}class="{$input.class}"{/if} for="{$value.id}"> {$value.label}</label>
<label {if isset($input.class)}class="{$input.class}"{/if} for="{$value.id}">
{if isset($input.is_bool) && $input.is_bool == true}
{if $value.value == 1}
<img src="../img/admin/enabled.gif" alt="{$value.label}" title="{$value.label}" />
{else}
<img src="../img/admin/disabled.gif" alt="{$value.label}" title="{$value.label}" />
{/if}
{else}
{$value.label}
{/if}
</label>
{/foreach}
{elseif $input.type == 'textarea'}
<textarea name="{$input.name}" id="{$input.name}" cols="{$input.cols}" rows="{$input.rows}">{$fields_value[$input.name]}</textarea>
+1 -1
View File
@@ -243,7 +243,7 @@
<input type="file" name="{$input.name}" />
<p class="clear">{$input.p}</p>
{if isset($fields_value.image) && $fields_value.image}
<div id="image" style="width:390px;">
<div id="image" style="width:370px;">
{$fields_value.image}
<p align="center">{l s='File size'} {$fields_value.size}kb</p>
<a href="{$current}&id_store={$form_id}&token={$token}&deleteImage=1">
+5 -5
View File
@@ -50,6 +50,11 @@ class AdminAliasesControllerCore extends AdminController
'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)
);
parent::__construct();
}
public function initForm()
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Aliases'),
@@ -82,11 +87,6 @@ class AdminAliasesControllerCore extends AdminController
)
);
parent::__construct();
}
public function initForm()
{
$this->fields_value = array('alias' => $this->object->getAliases());
parent::initForm();
+13 -12
View File
@@ -48,15 +48,6 @@ class AdminCarriersControllerCore extends AdminController
'dir' => 'st'
);
parent::__construct();
}
public function initList()
{
$this->_select = 'b.*';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'carrier_lang` b ON a.id_carrier = b.id_carrier';
$this->_where = 'AND b.id_lang = '.$this->context->language->id;
$this->fieldsDisplay = array(
'id_carrier' => array(
'title' => $this->l('ID'),
@@ -105,10 +96,7 @@ class AdminCarriersControllerCore extends AdminController
'position' => 'position'
)
);
}
public function initOptions()
{
$carrier_default_sort = array(
array('value' => Carrier::SORT_BY_PRICE, 'name' => $this->l('Price')),
array('value' => Carrier::SORT_BY_POSITION, 'name' => $this->l('Position'))
@@ -138,6 +126,17 @@ class AdminCarriersControllerCore extends AdminController
'submit' => array()
)
);
parent::__construct();
}
public function initList()
{
$this->_select = 'b.*';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'carrier_lang` b ON a.id_carrier = b.id_carrier';
$this->_where = 'AND b.id_lang = '.$this->context->language->id;
parent::initList();
}
public function initForm()
@@ -357,6 +356,8 @@ class AdminCarriersControllerCore extends AdminController
'title' => $this->l(' Save '),
'class' => 'button'
);
parent::initForm();
}
public function postProcess()
+12 -19
View File
@@ -48,14 +48,6 @@ class AdminCountriesControllerCore extends AdminController
'dir' => 'st'
);
parent::__construct();
}
public function initList()
{
$this->_select = 'z.`name` AS zone';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = a.`id_zone`)';
$this->fieldsDisplay = array(
'id_country' => array(
'title' => $this->l('ID'),
@@ -92,10 +84,7 @@ class AdminCountriesControllerCore extends AdminController
'filter_key' => 'a!active'
)
);
}
public function initOptions()
{
$this->options = array(
'general' => array(
'title' => $this->l('Countries options'),
@@ -118,6 +107,16 @@ class AdminCountriesControllerCore extends AdminController
'submit' => array()
)
);
parent::__construct();
}
public function initList()
{
$this->_select = 'z.`name` AS zone';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = a.`id_zone`)';
parent::initList();
}
public function initForm()
@@ -353,6 +352,8 @@ class AdminCountriesControllerCore extends AdminController
'title' => $this->l(' Save '),
'class' => 'button'
);
parent::initForm();
}
public function postProcess()
@@ -401,14 +402,6 @@ class AdminCountriesControllerCore extends AdminController
}
}
public function initContent()
{
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
parent::initContent();
}
private function displayValidFields()
{
$html = '<ul>';
+13 -18
View File
@@ -86,6 +86,11 @@ class AdminGendersController extends AdminController
)
);
parent::__construct();
}
public function initForm()
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Gender'),
@@ -153,26 +158,16 @@ class AdminGendersController extends AdminController
)
);
parent::__construct();
}
if (!($obj = $this->loadObject(true)))
return;
public function initContent()
{
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
else
{
if (!($obj = $this->loadObject(true)))
return;
$this->fields_value = array(
'img_width' => $this->default_image_width,
'img_height' => $this->default_image_height,
'image' => $obj->getImage()
);
$this->fields_value = array(
'img_width' => $this->default_image_width,
'img_height' => $this->default_image_height,
'image' => $obj->getImage()
);
}
parent::initContent();
parent::initForm();
}
public function displayGenderType($value, $tr)
+47 -52
View File
@@ -47,9 +47,11 @@ class AdminGroupShopControllerCore extends AdminController
'active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'active'),
);
$enabled = '<img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" />';
$disabled = '<img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" />';
parent::__construct();
}
public function initForm()
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('GroupShop')
@@ -66,16 +68,17 @@ class AdminGroupShopControllerCore extends AdminController
'name' => 'share_customer',
'required' => true,
'class' => 't',
'is_bool' => true,
'values' => array(
array(
'id' => 'share_customer_on',
'value' => 1,
'label' => $enabled
'label' => $this->l('Enabled')
),
array(
'id' => 'share_customer_off',
'value' => 0,
'label' => $disabled
'label' => $this->l('Disabled')
)
),
'p' => $this->l('Share customers between shops of this group')
@@ -86,16 +89,17 @@ class AdminGroupShopControllerCore extends AdminController
'name' => 'share_stock',
'required' => true,
'class' => 't',
'is_bool' => true,
'values' => array(
array(
'id' => 'share_stock_on',
'value' => 1,
'label' => $enabled
'label' => $this->l('Enabled')
),
array(
'id' => 'share_stock_off',
'value' => 0,
'label' => $disabled
'label' => $this->l('Disabled')
)
),
'p' => $this->l('Share stock between shops of this group')
@@ -106,16 +110,17 @@ class AdminGroupShopControllerCore extends AdminController
'name' => 'share_order',
'required' => true,
'class' => 't',
'is_bool' => true,
'values' => array(
array(
'id' => 'share_order_on',
'value' => 1,
'label' => $enabled
'label' => $this->l('Enabled')
),
array(
'id' => 'share_order_off',
'value' => 0,
'label' => $disabled
'label' => $this->l('Disabled')
)
),
'p' => $this->l('Share orders and carts between shops of this group (you can share orders only if you share customers and stock)')
@@ -126,16 +131,17 @@ class AdminGroupShopControllerCore extends AdminController
'name' => 'active',
'required' => true,
'class' => 't',
'is_bool' => true,
'values' => array(
array(
'id' => 'active_on',
'value' => 1,
'label' => $enabled
'label' => $this->l('Enabled')
),
array(
'id' => 'active_off',
'value' => 0,
'label' => $disabled
'label' => $this->l('Disabled')
)
),
'p' => $this->l('Enable or disable shop')
@@ -147,6 +153,27 @@ class AdminGroupShopControllerCore extends AdminController
)
);
if (!($obj = $this->loadObject(true)))
return;
if (Shop::getTotalShops() > 1 && $obj->id)
$disabled = array(
'share_customer' => true,
'share_stock' => true,
'share_order' => true,
'active' => false
);
else
$disabled = false;
$this->context->smarty->assign(array(
'disabled' => $disabled,
'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false,
'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID()
));
parent::initForm();
$import_data = array(
'attribute_group' => $this->l('Attribute groups'),
'attribute' => $this->l('Attributes'),
@@ -189,7 +216,16 @@ class AdminGroupShopControllerCore extends AdminController
)
);
parent::__construct();
$helper = new HelperForm();
// Check if form template has been overriden
if (file_exists($this->context->smarty->template_dir[0].'/'.$this->tpl_folder.'form_import.tpl'))
$helper->tpl = $this->tpl_folder.'form_import.tpl';
$helper->currentIndex = self::$currentIndex;
$helper->token = $this->token;
$helper->table = $this->table;
$helper->id = $obj->id;
$helper->fields_value = $this->getFieldsValue($obj);
$this->content .= $helper->generateForm($this->fields_import_form);
}
public function postProcess()
@@ -208,47 +244,6 @@ class AdminGroupShopControllerCore extends AdminController
return parent::postProcess();
}
public function initContent()
{
if (!($obj = $this->loadObject(true)))
return;
if (Shop::getTotalShops() > 1 && $obj->id)
$disabled = array(
'share_customer' => true,
'share_stock' => true,
'share_order' => true,
'active' => false
);
else
$disabled = false;
$this->context->smarty->assign(array(
'disabled' => $disabled,
'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false,
'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID()
));
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
parent::initContent();
if ($this->display == 'edit' || $this->display == 'add')
{
$helper = new HelperForm();
// Check if form template has been overriden
if (file_exists($this->context->smarty->template_dir.'/'.$this->tpl_folder.'form_import.tpl'))
$helper->tpl = $this->tpl_folder.'form_import.tpl';
$helper->currentIndex = self::$currentIndex;
$helper->token = $this->token;
$helper->table = $this->table;
$helper->id = $obj->id;
$helper->fields_value = $this->getFieldsValue($obj);
$this->content .= $helper->generateForm($this->fields_import_form);
}
}
public function afterAdd($new_group_shop)
{
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
@@ -96,14 +96,6 @@ class AdminOrderMessageController extends AdminController
parent::__construct();
}
public function initContent()
{
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
parent::initContent();
}
}
@@ -119,15 +119,6 @@ class AdminQuickAccessesController extends AdminController
parent::__construct();
}
public function initContent()
{
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
parent::initContent();
}
}
@@ -79,14 +79,6 @@ class AdminSearchEnginesControllerCore extends AdminController
parent::__construct();
}
public function initContent()
{
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
parent::initContent();
}
}
+30 -30
View File
@@ -43,9 +43,6 @@ class AdminShopUrlControllerCore extends AdminController
if (!Tools::getValue('realedit'))
$this->deleted = false;
$this->_select = 's.name AS shop_name, CONCAT(a.physical_uri, a.virtual_uri) AS uri';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'shop` s ON (s.id_shop = a.id_shop)';
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
$this->fieldsDisplay = array(
@@ -58,6 +55,19 @@ class AdminShopUrlControllerCore extends AdminController
'active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'active'),
);
parent::__construct();
}
public function initList()
{
$this->_select = 's.name AS shop_name, CONCAT(a.physical_uri, a.virtual_uri) AS uri';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'shop` s ON (s.id_shop = a.id_shop)';
parent::initList();
}
public function initForm()
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Shop Url')
@@ -168,7 +178,23 @@ class AdminShopUrlControllerCore extends AdminController
)
);
parent::__construct();
if (!($obj = $this->loadObject(true)))
return;
$current_shop = Shop::initialize();
$list_shop_with_url = array();
foreach (Shop::getShops(false, null, true) as $id)
$list_shop_with_url[$id] = (bool)count(ShopUrl::getShopUrls($id));
$this->context->smarty->assign('jsShopUrl', Tools::jsonEncode($list_shop_with_url));
$this->fields_value = array(
'domain' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain') : $current_shop->domain,
'domain_ssl' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain_ssl') : $current_shop->domain_ssl,
'physical_uri' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'physical_uri') : $current_shop->physical_uri
);
parent::initForm();
}
public function postProcess()
@@ -220,32 +246,6 @@ class AdminShopUrlControllerCore extends AdminController
if (Tools::getValue('main'))
$object->setMain();
}
public function initContent()
{
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
else
{
if (!($obj = $this->loadObject(true)))
return;
$current_shop = Shop::initialize();
$list_shop_with_url = array();
foreach (Shop::getShops(false, null, true) as $id)
$list_shop_with_url[$id] = (bool)count(ShopUrl::getShopUrls($id));
$this->context->smarty->assign('jsShopUrl', Tools::jsonEncode($list_shop_with_url));
$this->fields_value = array(
'domain' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain') : $current_shop->domain,
'domain_ssl' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain_ssl') : $current_shop->domain_ssl,
'physical_uri' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'physical_uri') : $current_shop->physical_uri
);
}
parent::initContent();
}
}
+14 -13
View File
@@ -44,9 +44,6 @@ class AdminStatesControllerCore extends AdminController
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
$this->_select = 'z.`name` AS zone';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = a.`id_zone`)';
$this->fieldsDisplay = array(
'id_state' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Name'), 'width' => 140, 'filter_key' => 'a!name'),
@@ -54,6 +51,19 @@ class AdminStatesControllerCore extends AdminController
'zone' => array('title' => $this->l('Zone'), 'width' => 100, 'filter_key' => 'z!name')
);
parent::__construct();
}
public function initList()
{
$this->_select = 'z.`name` AS zone';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = a.`id_zone`)';
parent::initList();
}
public function initForm()
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('States'),
@@ -133,7 +143,7 @@ class AdminStatesControllerCore extends AdminController
)
);
parent::__construct();
parent::initForm();
}
public function postProcess()
@@ -185,15 +195,6 @@ class AdminStatesControllerCore extends AdminController
else
parent::postProcess();
}
public function initContent()
{
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
parent::initContent();
}
}
+85 -94
View File
@@ -48,14 +48,6 @@ class AdminStoresControllerCore extends AdminController
'dir' => 'st'
);
$this->_select = 'cl.`name` country, st.`name` state';
$this->_join = '
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl
ON (cl.`id_country` = a.`id_country`
AND cl.`id_lang` = '.(int)$this->context->language->id.')
LEFT JOIN `'._DB_PREFIX_.'state` st
ON (st.`id_state` = a.`id_state`)';
$this->fieldsDisplay = array(
'id_store' => array(
'title' => $this->l('ID'),
@@ -80,6 +72,65 @@ class AdminStoresControllerCore extends AdminController
'active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)
);
$this->options = array(
'general' => array(
'title' => $this->l('Parameters'),
'fields' => array(
'PS_STORES_DISPLAY_FOOTER' => array(
'title' => $this->l('Display in the footer:'),
'desc' => $this->l('Display a link to the store locator in the footer'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_DISPLAY_SITEMAP' => array(
'title' => $this->l('Display in the sitemap page:'),
'desc' => $this->l('Display a link to the store locator in the sitemap page'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_SIMPLIFIED' => array(
'title' => $this->l('Show a simplified store locator:'),
'desc' => $this->l('No map, no search, only a store directory'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_CENTER_LAT' => array(
'title' => $this->l('Latitude by default:'),
'desc' => $this->l('Used for the position by default of the map'),
'cast' => 'floatval',
'type' => 'text',
'size' => '10'
),
'PS_STORES_CENTER_LONG' => array(
'title' => $this->l('Longitude by default:'),
'desc' => $this->l('Used for the position by default of the map'),
'cast' => 'floatval',
'type' => 'text',
'size' => '10'
)
),
'submit' => array()
)
);
parent::__construct();
}
public function initList()
{
$this->_select = 'cl.`name` country, st.`name` state';
$this->_join = '
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl
ON (cl.`id_country` = a.`id_country`
AND cl.`id_lang` = '.(int)$this->context->language->id.')
LEFT JOIN `'._DB_PREFIX_.'state` st
ON (st.`id_state` = a.`id_state`)';
parent::initList();
}
public function initForm()
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Stores'),
@@ -213,48 +264,34 @@ class AdminStoresControllerCore extends AdminController
)
);
$this->options = array(
'general' => array(
'title' => $this->l('Parameters'),
'fields' => array(
'PS_STORES_DISPLAY_FOOTER' => array(
'title' => $this->l('Display in the footer:'),
'desc' => $this->l('Display a link to the store locator in the footer'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_DISPLAY_SITEMAP' => array(
'title' => $this->l('Display in the sitemap page:'),
'desc' => $this->l('Display a link to the store locator in the sitemap page'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_SIMPLIFIED' => array(
'title' => $this->l('Show a simplified store locator:'),
'desc' => $this->l('No map, no search, only a store directory'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_CENTER_LAT' => array(
'title' => $this->l('Latitude by default:'),
'desc' => $this->l('Used for the position by default of the map'),
'cast' => 'floatval',
'type' => 'text',
'size' => '10'
),
'PS_STORES_CENTER_LONG' => array(
'title' => $this->l('Longitude by default:'),
'desc' => $this->l('Used for the position by default of the map'),
'cast' => 'floatval',
'type' => 'text',
'size' => '10'
)
),
'submit' => array()
)
if (!($obj = $this->loadObject(true)))
return;
$image = cacheImage(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true);
$days = array();
$days[1] = $this->l('Monday');
$days[2] = $this->l('Tuesday');
$days[3] = $this->l('Wednesday');
$days[4] = $this->l('Thursday');
$days[5] = $this->l('Friday');
$days[6] = $this->l('Saturday');
$days[7] = $this->l('Sunday');
$hours = $this->getFieldValue($obj, 'hours');
if (!empty($hours))
$hours_unserialized = unserialize($hours);
$this->fields_value = array(
'latitude' => $this->getFieldValue($obj, 'latitude') ? $this->getFieldValue($obj, 'latitude') : Configuration::get('PS_STORES_CENTER_LAT'),
'longitude' => $this->getFieldValue($obj, 'longitude') ? $this->getFieldValue($obj, 'longitude') : Configuration::get('PS_STORES_CENTER_LONG'),
'image' => $image ? $image : false,
'size' => $image ? filesize(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg') / 1000 : false,
'days' => $days,
'hours' => isset($hours_unserialized) ? $hours_unserialized : false
);
parent::__construct();
parent::initForm();
}
public function postProcess()
@@ -328,52 +365,6 @@ class AdminStoresControllerCore extends AdminController
parent::postProcess();
}
public function initContent()
{
if (!($obj = $this->loadObject(true)))
return;
$image = cacheImage(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true);
$days = array();
$days[1] = $this->l('Monday');
$days[2] = $this->l('Tuesday');
$days[3] = $this->l('Wednesday');
$days[4] = $this->l('Thursday');
$days[5] = $this->l('Friday');
$days[6] = $this->l('Saturday');
$days[7] = $this->l('Sunday');
$hours = $this->getFieldValue($obj, 'hours');
if (!empty($hours))
$hours_unserialized = unserialize($hours);
$this->fields_value = array(
'latitude' => $this->getFieldValue($obj, 'latitude') ? $this->getFieldValue($obj, 'latitude') : Configuration::get('PS_STORES_CENTER_LAT'),
'longitude' => $this->getFieldValue($obj, 'longitude') ? $this->getFieldValue($obj, 'longitude') : Configuration::get('PS_STORES_CENTER_LONG'),
'image' => $image ? $image : false,
'size' => $image ? filesize(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg') / 1000 : false,
'days' => $days,
'hours' => isset($hours_unserialized) ? $hours_unserialized : false
);
if ($this->display != 'edit' && $this->display != 'add')
$this->display = 'list';
parent::initContent();
if ($this->display == 'list')
{
$helper = new HelperOptions();
if (file_exists($this->context->smarty->template_dir.'/'.$this->tpl_folder.'options.tpl'))
$helper->tpl = $this->tpl_folder.'options.tpl';
$helper->id = $this->id;
$helper->currentIndex = self::$currentIndex;
$this->content .= $helper->generateOptions($this->options);
}
}
protected function postImage($id)
{
$ret = parent::postImage($id);