// bugfix admin products, adminattributesgroups, admincategories
// helper list and form improved
This commit is contained in:
@@ -31,24 +31,24 @@
|
||||
var id_language = {$defaultFormLanguage};
|
||||
var languages = new Array();
|
||||
|
||||
$(document).ready(function() {ldelim}
|
||||
$(document).ready(function() {
|
||||
{foreach $languages as $k => $language}
|
||||
languages[{$k}] = {ldelim}
|
||||
languages[{$k}] = {
|
||||
id_lang: {$language.id_lang},
|
||||
iso_code: '{$language.iso_code}',
|
||||
name: '{$language.name}'
|
||||
{rdelim};
|
||||
};
|
||||
{/foreach}
|
||||
displayFlags(languages, id_language, {$allowEmployeeFormLang});
|
||||
|
||||
{if isset($fields_value.id_state)}
|
||||
if ($('#id_country') && $('#id_state'))
|
||||
{ldelim}
|
||||
{
|
||||
ajaxStates({$fields_value.id_state});
|
||||
$('#id_country').change(function() {ldelim}
|
||||
$('#id_country').change(function() {
|
||||
ajaxStates();
|
||||
{rdelim});
|
||||
{rdelim}
|
||||
});
|
||||
}
|
||||
{/if}
|
||||
|
||||
if ($(".datepicker").length > 0)
|
||||
@@ -58,17 +58,16 @@
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
|
||||
{rdelim});
|
||||
</script>
|
||||
<script type="text/javascript" src="../js/form.js"></script>
|
||||
});
|
||||
{block name="script"}
|
||||
{/block}
|
||||
</script>
|
||||
<script type="text/javascript" src="../js/form.js"></script>
|
||||
{/if}
|
||||
|
||||
{if isset($toolbar) && $toolbar}
|
||||
{include file="toolbar.tpl"}
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
{/if}
|
||||
|
||||
{if isset($fields.title)}<h2>{$fields.title}</h2>{/if}
|
||||
<form class="defaultForm" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
|
||||
{if $form_id}
|
||||
@@ -233,14 +232,28 @@
|
||||
name="{$input.name}"
|
||||
size="{$input.size}"
|
||||
value="" />
|
||||
{elseif $input.type == 'birthday'}
|
||||
{foreach $input.options as $key => $select}
|
||||
<select name="{$key}">
|
||||
<option value="">-</option>
|
||||
{if $key == 'months'}
|
||||
{foreach $select as $k => $v}
|
||||
<option value="{$k}" {if $k == $fields_value[$key]}selected="selected"{/if}>{$v}</option>
|
||||
{/foreach}
|
||||
{else}
|
||||
{foreach $select as $v}
|
||||
<option value="{$v}" {if $v == $fields_value[$key]}selected="selected"{/if}>{$v}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
{/foreach}
|
||||
{elseif $input.type == 'group'}
|
||||
{assign var=groups value=$input.values}
|
||||
{include file='helper/form/form_group.tpl'}
|
||||
{elseif $input.type == 'shop' OR $input.type == 'group_shop'}
|
||||
{include file='helper/form/form_shop.tpl'}
|
||||
{elseif $input.type == 'categories'}
|
||||
{assign var=categories value=$input.values}
|
||||
{include file='helper/form/form_category.tpl'}
|
||||
{include file='helper/form/form_category.tpl' categories=$input.values}
|
||||
{elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
|
||||
<label>{l s='Shop association:'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
@@ -58,16 +58,17 @@
|
||||
|
||||
{assign var=home_is_selected value=false}
|
||||
|
||||
|
||||
{foreach $categories.selected_cat AS $cat}
|
||||
{if is_array($cat)}
|
||||
{if $cat['id_category'] != 1}
|
||||
<input type="hidden" name="{$categories.input_name}" value="{$cat.id_category}" >
|
||||
{if $cat.id_category != 1}
|
||||
<input {if in_array($cat.id_category, $categories.disabled_categories)}disabled="disabled"{/if} type="hidden" name="{$categories.input_name}" value="{$cat.id_category}" >
|
||||
{else}
|
||||
{assign var=home_is_selected value=true}
|
||||
{/if}
|
||||
{else}
|
||||
{if $cat != 1}
|
||||
<input type="hidden" name="{$categories.input_name}" value="{$cat}" >
|
||||
<input {if in_array($cat, $categories.disabled_categories)}disabled="disabled"{/if} type="hidden" name="{$categories.input_name}" value="{$cat}" >
|
||||
{else}
|
||||
{assign var=home_is_selected value=true}
|
||||
{/if}
|
||||
@@ -88,4 +89,4 @@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{$header}
|
||||
{$content}
|
||||
{$footer}
|
||||
@@ -24,6 +24,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tbody>
|
||||
{if count($list)}
|
||||
{foreach $list AS $index => $tr}
|
||||
<tr
|
||||
{if $is_dnd_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position['position']}"{/if}
|
||||
@@ -41,8 +42,8 @@
|
||||
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
|
||||
{/if}
|
||||
class="{if !$no_link}pointer{/if}
|
||||
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
|
||||
{if isset($params.align)} {$params.align}{/if}"
|
||||
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
|
||||
{if isset($params.align)} {$params.align}{/if}"
|
||||
|
||||
{if (!isset($params.position) && !$no_link)}
|
||||
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">{if isset($params.prefix)}{$params.prefix}{/if}
|
||||
@@ -50,7 +51,7 @@
|
||||
>
|
||||
{/if}
|
||||
{if isset($params.active)}
|
||||
{$tr.$key}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.activeVisu)}
|
||||
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
|
||||
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
|
||||
@@ -70,7 +71,7 @@
|
||||
{$tr.$key}
|
||||
{elseif (isset($params.icon))}
|
||||
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$tr[$key]}" />
|
||||
{elseif isset($params.price)}
|
||||
{elseif isset($params.price)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.float)}
|
||||
{$tr.$key}
|
||||
@@ -80,6 +81,8 @@
|
||||
{$tr.$key}
|
||||
{elseif isset($params.callback)}
|
||||
{$tr.$key}
|
||||
{elseif isset($tr.$key) && $key == 'color'}
|
||||
<div style="float: left; width: 18px; height: 12px; border: 1px solid #996633; background-color: {$tr.$key}; margin-right: 4px;"></div>
|
||||
{elseif isset($tr.$key)}
|
||||
{$tr.$key|escape:'htmlall':'UTF-8'}
|
||||
{else}
|
||||
@@ -90,17 +93,25 @@
|
||||
{/foreach}
|
||||
|
||||
{if $shop_link_type}
|
||||
<td class="center" {if $name != $tr.shop_name}title="{$tr.shop_name}"{/if}>{if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if}</td>
|
||||
<td class="center" title="{$tr.shop_name}">
|
||||
{if isset($tr.shop_short_name)}
|
||||
{$tr.shop_short_name}
|
||||
{else}
|
||||
{$tr.shop_name}
|
||||
{/if}</td>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<td class="center" style="white-space: nowrap;">
|
||||
{foreach $actions AS $action}
|
||||
{if isset($tr.$action)}
|
||||
{$tr.$action}
|
||||
{/if}
|
||||
{$tr.$action}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
{else}
|
||||
<tr><td class="center" colspan="{count($fields_display) + 2}">{l s='No items found'}</td></tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</script>
|
||||
{* Display column names and arrows for ordering (ASC, DESC) *}
|
||||
{if $is_order_position}
|
||||
<script type="text/javascript" src="../js/jquery/jquery.tablednd_0_5.js"></script>
|
||||
<script type="text/javascript" src="../js/jquery/plugins/jquery.tablednd.js"></script>
|
||||
<script type="text/javascript">
|
||||
var token = '{$token}';
|
||||
var come_from = '{$table}';
|
||||
@@ -55,14 +55,20 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{if isset($toolbar) && $toolbar}
|
||||
{include file="toolbar.tpl"}
|
||||
{/if}
|
||||
|
||||
<a name="{$table}"> </a>
|
||||
{/if}{* End if simple_header *}
|
||||
<form method="post" action="{$action}" class="form">
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$page_title|default:' '}</span>
|
||||
{/block}</h3>
|
||||
</div>
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
{/if}
|
||||
|
||||
<a name="{$table}"> </a>
|
||||
|
||||
<form method="post" action="{$action}" class="form">
|
||||
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
|
||||
<table class="table_grid">
|
||||
{if !$simple_header}
|
||||
|
||||
Reference in New Issue
Block a user