[-] BO : fix bug in themes for AdminShopController

This commit is contained in:
lLefevre
2011-12-30 14:13:36 +00:00
parent f4ff375475
commit c4c71dc5f9
2 changed files with 7 additions and 7 deletions
@@ -41,12 +41,13 @@
<div class="margin-form">
{if $input.type == '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');">
{$theme.name}<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} />
<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 />
<img src="../themes/{$theme->directory}/preview.jpg" alt="{$theme->directory}" /><br />
<input type="radio" name="id_theme" value="{$theme->id}" {if $theme->id == $fields_value.id_theme_checked}checked="checked"{/if} />
</div>
{/foreach}
<div class="clear">&nbsp;</div>
{/if}
{if $input.type == 'textGroupShop'}
{$input.value}
+2 -3
View File
@@ -313,8 +313,6 @@ class AdminShopControllerCore extends AdminController
);
$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(
'type' => 'theme',
@@ -391,7 +389,8 @@ class AdminShopControllerCore extends AdminController
$this->fields_value = array(
'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(