[-] BO : fix bug in themes for AdminShopController
This commit is contained in:
@@ -41,12 +41,13 @@
|
|||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
{if $input.type == 'theme'}
|
{if $input.type == 'theme'}
|
||||||
{foreach $input.values as $theme}
|
{foreach $input.values as $theme}
|
||||||
<div class="select_theme {if $theme.checked}select_theme_choice{/if}" onclick="$(this).find('input').attr('checked', true); $('.select_theme').removeClass('select_theme_choice'); $(this).toggleClass('select_theme_choice');">
|
<div class="select_theme {if $theme->id == $fields_value.id_theme_checked}select_theme_choice{/if}" onclick="$(this).find('input').attr('checked', true); $('.select_theme').removeClass('select_theme_choice'); $(this).toggleClass('select_theme_choice');">
|
||||||
{$theme.name}<br />
|
{$theme->name}<br />
|
||||||
<img src="../themes/{$theme.directory}/preview.jpg" alt="{$theme.directory}" /><br />
|
<img src="../themes/{$theme->directory}/preview.jpg" alt="{$theme->directory}" /><br />
|
||||||
<input type="radio" name="id_theme" value="{$theme.id_theme}" {if $theme.checked}checked="checked"{/if} />
|
<input type="radio" name="id_theme" value="{$theme->id}" {if $theme->id == $fields_value.id_theme_checked}checked="checked"{/if} />
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
<div class="clear"> </div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $input.type == 'textGroupShop'}
|
{if $input.type == 'textGroupShop'}
|
||||||
{$input.value}
|
{$input.value}
|
||||||
|
|||||||
@@ -313,8 +313,6 @@ class AdminShopControllerCore extends AdminController
|
|||||||
);
|
);
|
||||||
|
|
||||||
$themes = Theme::getThemes();
|
$themes = Theme::getThemes();
|
||||||
foreach ($themes as $i => $theme)
|
|
||||||
$themes[$i]['checked'] = ((!$obj->id && $i == 0) || $obj->id_theme == $theme['id_theme']) ? true : false;
|
|
||||||
|
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'theme',
|
'type' => 'theme',
|
||||||
@@ -391,7 +389,8 @@ class AdminShopControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->fields_value = array(
|
$this->fields_value = array(
|
||||||
'id_group_shop' => $obj->id_group_shop,
|
'id_group_shop' => $obj->id_group_shop,
|
||||||
'active' => true
|
'active' => true,
|
||||||
|
'id_theme_checked' => isset($obj->id_theme) ? $obj->id_theme : 0
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->tpl_form_vars = array(
|
$this->tpl_form_vars = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user