[+] BO Wip BS -> Products + fix

This commit is contained in:
Kevin Granger
2013-07-05 18:36:42 +02:00
parent 0ad4b44866
commit 1f33638f32
12 changed files with 826 additions and 8120 deletions
File diff suppressed because one or more lines are too long
+21 -3
View File
@@ -18,9 +18,11 @@ body.fixed-top
height: 100%
#content
height: 100%
padding: 20px
margin: 0 0 90px 240px
float: left
width: 1280px
min-height: 100%
padding: 20px 20px 90px 20px
margin: 0 0 0 240px
border-left: 1px solid #CECECE
background-color: white
@@ -169,6 +171,8 @@ $icon-color: #7A0928
@extend .icon-bar-chart
background-color: adjust-hue($icon-color, 220)
.navbar-inner
box-shadow: none!important
.input-append
@@ -229,6 +233,20 @@ $icon-color: #7A0928
@extend .icon-download
.process-icon-new-module
@extend .icon-plus
.process-icon-delete
@extend .icon-trash
.process-icon-update
@extend icon-refresh
.process-icon-preview
@extend .icon-eye-open
.process-icon-previewURL
@extend .icon-eye-open
.process-icon-stats
@extend .icon-bar-chart
.process-icon-duplicate
@extend .icon-copy
.process-icon-newCombination
@extend .icon-plus-sign
.page-head
position: relative
@@ -5,31 +5,26 @@
{l s='Name'}
</span>
</label>
<!-- For demo -->
<div class="input-group col-lg-8">
<div class="col-lg-8">
{foreach from=$languages item=language}
<input id="name_{$language.id_lang|intval}" type="text" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)|escape:html:'UTF-8'}">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="http://checkout.kg/PS_BOOTSTRAP/img/l/1.jpg" alt=""> English
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="active"><a href="#"><img src="http://checkout.kg/PS_BOOTSTRAP/img/l/1.jpg" alt=""> English</a></li>
<li><a href="#"><img src="http://checkout.kg/PS_BOOTSTRAP/img/l/2.jpg" alt=""> Français</a></li>
</ul>
<div class="row">
<div class="input-group col-lg-12">
<input id="name_{$language.id_lang|intval}" type="text" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)|escape:html:'UTF-8'}">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt="">
{$language.iso_code}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li><a href="#"><img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.iso_code}</a></li>
{/foreach}
</ul>
</div>
</div>
</div>
{/foreach}
<!-- Original component commented for demo
<div class="translatable">
{foreach from=$languages item=language}
<div class="lang_{$language.id_lang|intval}">
<input type="text" id="name_{$language.id_lang|intval}" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)|escape:html:'UTF-8'}"/>
</div>
{/foreach}
</div>-->
</div>
</div>
@@ -55,7 +50,7 @@
<div class="input-group col-lg-4">
<input type="text" id="code" name="code" value="{$currentTab->getFieldValue($currentObject, 'code')|escape}" />
<span class="input-group-btn">
<a href="javascript:gencode(8);" class="btn btn-default"><i class="icon-random"></i> {l s='Generate'}</a>
<a href="javascript:gencode(8);" class="btn btn-default"><i class="icon-random"></i> {l s='Generate'}</a>
</span>
</div>
</div>
@@ -64,178 +64,181 @@
{block name="defaultForm"}
<div class="row-fluid">
<div class="productTabs" style="display:none;">
<ul class="tab nav nav-tabs">
{*todo href when nojs*}
<div class="productTabs col-lg-2">
<ul class="tab nav nav-pills nav-stacked">
{foreach $product_tabs key=numStep item=tab}
<li class="tab-row">
<a class="tab-page {if $tab.selected}selected{/if}" id="link-{$tab.id}" href="{$tab.href}&amp;updateproduct">{$tab.name}</a>
<li class="tab-row {if $tab.selected}active{/if}">
<a class="tab-page" id="link-{$tab.id}" href="{$tab.href}&amp;updateproduct">{$tab.name}</a>
</li>
{/foreach}
</ul>
</div>
</div>
<script type="text/javascript">
var token = '{$token}';
var id_product = {if isset($product->id)}{$product->id}{else}0{/if};
var id_lang_default = {$id_lang_default};
var product_type_pack = {Product::PTYPE_PACK};
var product_type_virtual = {Product::PTYPE_VIRTUAL};
var product_type_simple = {Product::PTYPE_SIMPLE};
var has_combinations = {$has_combinations};
<script type="text/javascript">
var token = '{$token}';
var id_product = {if isset($product->id)}{$product->id}{else}0{/if};
var id_lang_default = {$id_lang_default};
var product_type_pack = {Product::PTYPE_PACK};
var product_type_virtual = {Product::PTYPE_VIRTUAL};
var product_type_simple = {Product::PTYPE_SIMPLE};
var toload = new Array();
var empty_pack_msg = '{l s='This pack is empty. You will need to add at least one product to the pack before you can save.' slashes=1}';
var empty_name_msg = '{l s='The product name is empty. You will at least need to enter a name for the default language before you can save the product.' slashes=1}';
var empty_link_rewrite_msg = '{l s='The friendly URL is empty. You will at least need to enter a friendly URL for the default language before you can save the product.' slashes=1}';
var reload_tab_title = '{l s='Confirmation' slashes=1}';
var reload_tab_description = '{l s='Some tabs was not loaded correctly. Would you like to reload them?' slashes=1}';
var has_combinations = {$has_combinations};
$('#product-tab-content-wait').show();
var post_data = {$post_data};
var save_error = {if $save_error}true{else}false{/if};
var toload = new Array();
var empty_pack_msg = '{l s='This pack is empty. You will need to add at least one product to the pack before you can save.' slashes=1}';
var empty_name_msg = '{l s='The product name is empty. You will at least need to enter a name for the default language before you can save the product.' slashes=1}';
var empty_link_rewrite_msg = '{l s='The friendly URL is empty. You will at least need to enter a friendly URL for the default language before you can save the product.' slashes=1}';
var reload_tab_title = '{l s='Confirmation' slashes=1}';
var reload_tab_description = '{l s='Some tabs was not loaded correctly. Would you like to reload them?' slashes=1}';
var product_type = {$product_type};
{*var mce_maximum = '{l s='Maximum'}';*}
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
var display_multishop_checkboxes = true;
{else}
var display_multishop_checkboxes = false;
{/if}
$(document).ready(function()
{
$('#product-tab-content-wait').show();
//product_type = $("input[name=type_product]:checked").val();
if (product_type == product_type_pack)
var post_data = {$post_data};
var save_error = {if $save_error}true{else}false{/if};
var product_type = {$product_type};
{*var mce_maximum = '{l s='Maximum'}';*}
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
var display_multishop_checkboxes = true;
{else}
var display_multishop_checkboxes = false;
{/if}
$(document).ready(function()
{
$('li.tab-row a[id*="VirtualProduct"]').hide();
}
else if (product_type == product_type_virtual)
{
$('li.tab-row a[id*="Pack"]').hide();
$('li.tab-row a[id*="Shipping"]').hide();
}
else
{
$('li.tab-row a[id*="Pack"]').hide();
$('li.tab-row a[id*="VirtualProduct"]').hide();
}
$('#product-tab-content-wait').show();
$('#desc-product-newCombination').hide();
{* submenu binding *}
$(".tab-page").click(function(e){
e.preventDefault();
// currentId is the current product tab id
currentId = $(".productTabs a.selected").attr('id').substr(5);
// id is the wanted producttab id
id = $(this).attr('id').substr(5);
// Update submit button value
var split_position = id.indexOf('-') + 1;
var btn_name = id.substr(split_position);
$('#key_tab').val(btn_name);
if ($(this).attr("id") != $(".productTabs a.selected").attr('id'))
if (product_type == product_type_pack)
{
$(".tab-page").removeClass('selected');
$("#product-tab-content-"+currentId).hide();
$('li.tab-row a[id*="VirtualProduct"]').hide();
}
// if the tab has not already been loaded, load it now
tabs_manager.display(id, true);
tabs_manager.onLoad(id, function(){
$("#product-tab-content-"+id).show(0, function(){
$(this).trigger('displayed');
});
$("#link-"+id).addClass('selected');
});
var languages = new Array();
if (btn_name == "Combinations")
else if (product_type == product_type_virtual)
{
$('#desc-product-new').hide();
$('#desc-product-newCombination').show();
populate_attrs();
}
else if (btn_name == "Attachments")
{
handleSaveButtons();
$('li.tab-row a[id*="Pack"]').hide();
$('li.tab-row a[id*="Shipping"]').hide();
}
else
{
$('#desc-product-newCombination').hide();
// if pack is enabled, save button are visible only if pack is valid
handleSaveButtons();
$('li.tab-row a[id*="Pack"]').hide();
$('li.tab-row a[id*="VirtualProduct"]').hide();
}
$('#desc-product-newCombination').hide();
{* submenu binding *}
$(".productTabs a").click(function(e){
e.preventDefault();
// currentId is the current product tab id
currentId = $(".productTabs .tab-row.active a").attr('id').substr(5);
console.log(currentId);
// id is the wanted producttab id
id = $(this).attr('id').substr(5);
// Update submit button value
var split_position = id.indexOf('-') + 1;
var btn_name = id.substr(split_position);
$('#key_tab').val(btn_name);
if ($(this).attr("id") != $(".productTabs .tab-row.active a").attr('id'))
{
$(".productTabs .tab-row").removeClass('active');
$("#product-tab-content-"+currentId).hide();
}
// if the tab has not already been loaded, load it now
tabs_manager.display(id, true);
tabs_manager.onLoad(id, function(){
$("#product-tab-content-"+id).show(0, function(){
$(this).trigger('displayed');
//console.log('show tab'+id);
});
$("#link-"+id).parent().addClass('active');
});
var languages = new Array();
if (btn_name == "Combinations")
{
$('#desc-product-new').hide();
$('#desc-product-newCombination').show();
populate_attrs();
}
else if (btn_name == "Attachments")
{
handleSaveButtons();
}
else
{
$('#desc-product-newCombination').hide();
// if pack is enabled, save button are visible only if pack is valid
handleSaveButtons();
}
});
$(".productTabs .tab-row.active").click();
// disable save if Associations tab is not loaded
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
disableSave();
tabs_manager.onLoad('Associations', function(){
handleSaveButtons();
});
$('.confirm_leave').live('click', function(){
// Double quotes are necessary when the translated string has single quotes
return confirm("{l s='You will lose all unsaved modifications. Are you sure that you\'d like to proceed?' js=1}");
});
});
$(".productTabs a.selected").click();
var tabs_preloaded = new Array();
// disable save if Associations tab is not loaded
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
disableSave();
// Listen to the load event that is fired each time an ajax call to load a tab has completed
$(window).bind("load", function() {
{* Fill an array with tabs that need to be preloaded *}
var tabs_to_preload = new Array();
{foreach $tabs_preloaded as $tab_name => $value}
{* If the tab was not given a loading priority number it will not be preloaded *}
{if (is_numeric($value))}
if ($("#product-tab-content-"+'{$tab_name}').hasClass('not-loaded'))
tabs_to_preload.push('{$tab_name}');
{/if}
{/foreach}
tabs_manager.onLoad('Associations', function(){
handleSaveButtons();
// Recursively load tabs starting with the first element of stack
tabs_manager.displayBulk(tabs_to_preload);
$('.productTabs').show();
$('#product_form').show();
$('#product-tab-content-wait').hide();
});
</script>
$('.confirm_leave').live('click', function(){
// Double quotes are necessary when the translated string has single quotes
return confirm("{l s='You will lose all unsaved modifications. Are you sure that you\'d like to proceed?' js=1}");
});
<script type="text/javascript">
// <![CDATA[
ThickboxI18nImage = "{l s='Image'}";
ThickboxI18nOf = "{l s='of'}";
ThickboxI18nClose = "{l s='Close'}";
ThickboxI18nOrEscKey = "{l s='(or "Esc")'}";
ThickboxI18nNext = "{l s='Next >'}";
ThickboxI18nPrev = "{l s='< Previous'}";
tb_pathToImage = "../img/loadingAnimation.gif";
//]]>
</script>
});
var tabs_preloaded = new Array();
// Listen to the load event that is fired each time an ajax call to load a tab has completed
$(window).bind("load", function() {
{* Fill an array with tabs that need to be preloaded *}
var tabs_to_preload = new Array();
{foreach $tabs_preloaded as $tab_name => $value}
{* If the tab was not given a loading priority number it will not be preloaded *}
{if (is_numeric($value))}
if ($("#product-tab-content-"+'{$tab_name}').hasClass('not-loaded'))
tabs_to_preload.push('{$tab_name}');
{/if}
{/foreach}
// Recursively load tabs starting with the first element of stack
tabs_manager.displayBulk(tabs_to_preload);
$('.productTabs').show();
$('#product_form').show();
$('#product-tab-content-wait').hide();
});
</script>
<div id="product-tab-content-wait" style="display:none">
<div id="loading">{l s='Loading...'}</div>
</div>
{***********************************************}
{********** TO CHECK !!!!!!!!!!!!!!! ***********}
<script type="text/javascript">
// <![CDATA[
ThickboxI18nImage = "{l s='Image'}";
ThickboxI18nOf = "{l s='of'}";
ThickboxI18nClose = "{l s='Close'}";
ThickboxI18nOrEscKey = "{l s='(or "Esc")'}";
ThickboxI18nNext = "{l s='Next >'}";
ThickboxI18nPrev = "{l s='< Previous'}";
tb_pathToImage = "../img/loadingAnimation.gif";
//]]>
</script>
<div id="product-tab-content-wait" style="display:none"><div id="loading">{l s='Loading...'}</div></div>
<form id="product_form" class="form-horizontal col-lg-9" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
<input type="hidden" name="id_product" value="{$id_product}" />
<input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual|escape:html:'UTF-8'}" />
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
<input type="hidden" name="id_product" value="{$id_product}" />
<input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual|escape:html:'UTF-8'}" />
<div class="tab-pane" id="tabPane1">
{if !$product->active && $product->isAssociatedToShop()}
<div class="warn draft" >
{if !$product->active && $product->isAssociatedToShop()}
<div class="alert draft" >
<p>
<span style="float: left">
{l s='Your product will be saved as a draft.'}</span>
@@ -243,22 +246,21 @@
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
<br />
</p>
</div>
{/if}
{* all input are here *}
{foreach $product_tabs key=numStep item=tab}
<div id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}>
{if $tab.selected}
{$custom_form}
{/if}
</div>
{/foreach}
</div>
<input type="hidden" name="id_product_attribute" id="id_product_attribute" value="0" />
<input type="hidden" name="key_tab" id="key_tab" value="Informations" />
<input id="product_form_submit_btn" type="submit" value="{l s='Save'}" name="submitAddproduct" class="button" />
</form>
<br/>
{/block}
</div>
{/if}
{* all input are here *}
{foreach $product_tabs key=numStep item=tab}
<div id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}>
{if $tab.selected}
{$custom_form}
{/if}
</div>
{/foreach}
<input type="hidden" name="id_product_attribute" id="id_product_attribute" value="0" />
<input type="hidden" name="key_tab" id="key_tab" value="Informations" />
<button id="product_form_submit_btn" type="submit" name="submitAddproduct" class="btn btn-primary"> {l s='Save'}</button>
</form>
</div>
{/block}
@@ -23,14 +23,13 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{if $check_product_association_ajax}
{assign var=class_input_ajax value='check_product_name '}
{assign var=class_input_ajax value='check_product_name '}
{else}
{assign var=class_input_ajax value=''}
{assign var=class_input_ajax value=''}
{/if}
<input type="hidden" name="submitted_tabs[]" value="Informations" />
<div id="step1">
<h4 class="tab">1. {l s='Info.'}</h4>
<h4>{l s='Product global information'}</h4>
<input type="hidden" name="submitted_tabs[]" value="Informations" />
<h4 class="tab">{l s='Info.'}</h4>
<p>{l s='Product global information'}</p>
<script type="text/javascript">
{if isset($PS_ALLOW_ACCENTED_CHARS_URL) && $PS_ALLOW_ACCENTED_CHARS_URL}
var PS_ALLOW_ACCENTED_CHARS_URL = 1;
@@ -91,299 +90,263 @@
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"}
<div class="separation"></div>
<div id="warn_virtual_combinations" class="alert alert-block" style="display:none">{l s='You cannot use combinations with a virtual product.'}</div>
<div>
<label class="text">{$bullet_common_field} {l s='Type:'}</label>
<input type="radio" name="type_product" id="simple_product" value="{Product::PTYPE_SIMPLE}" {if $product_type == Product::PTYPE_SIMPLE}checked="checked"{/if} />
<label class="radioCheck" for="simple_product">{l s='Product'}</label>
<input type="radio" name="type_product" {if $is_in_pack}disabled="disabled"{/if} id="pack_product" value="{Product::PTYPE_PACK}" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} />
<label class="radioCheck" for="pack_product">{l s='Pack'}</label>
<input type="radio" name="type_product" id="virtual_product" {if $is_in_pack}disabled="disabled"{/if} value="{Product::PTYPE_VIRTUAL}" {if $product_type == Product::PTYPE_VIRTUAL}checked="checked"{/if} />
<label class="radioCheck" for="virtual_product">{l s='Virtual Product (services, booking or downloadable products)'}</label>
<div id="warn_virtual_combinations" class="alert alert-block" style="display:none">{l s='You cannot use combinations with a virtual product.'}</div>
<div class="row">
<label class="control-label col-lg-3">{$bullet_common_field} {l s='Type:'}</label>
<div class="col-lg-5">
<div class="radio">
<label for="simple_product">
<input type="radio" name="type_product" id="simple_product" value="{Product::PTYPE_SIMPLE}" {if $product_type == Product::PTYPE_SIMPLE}checked="checked"{/if} />
{l s='Product'}
</label>
</div>
<div class="radio">
<label for="pack_product">
<input type="radio" name="type_product" {if $is_in_pack}disabled="disabled"{/if} id="pack_product" value="{Product::PTYPE_PACK}" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} />
{l s='Pack'}
</label>
</div>
<div class="radio">
<label for="virtual_product">
<input type="radio" name="type_product" id="virtual_product" {if $is_in_pack}disabled="disabled"{/if} value="{Product::PTYPE_VIRTUAL}" {if $product_type == Product::PTYPE_VIRTUAL}checked="checked"{/if} />
{l s='Virtual Product (services, booking or downloadable products)'}
</label>
</div>
</div>
</div>
{* global information *}
{include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"}
<div class="row">
<label class="control-label col-lg-3 required">{l s='Name:'}</label>
<div class="col-lg-5 translatable">
{foreach from=$languages item=language}
<div class="lang_{$language.id_lang}">
<input class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" type="text" {if !$product->id}disabled="disabled"{/if}
id="name_{$language.id_lang}" name="name_{$language.id_lang}"
value="{$product->name[$language.id_lang]|htmlentitiesUTF8|default:''}"
/>
</div>
{/foreach}
<span class="help-block" name="help_box">{l s='Invalid characters:'} &lt;&gt;;=#{}</span>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{$bullet_common_field} {l s='Reference:'}</label>
<div class="col-lg-5">
<input type="text" name="reference" value="{$product->reference|htmlentitiesUTF8}" />
<span class="help-block" name="help_box">{l s='Special characters allowed:'} .-_#\</span>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{$bullet_common_field} {l s='EAN13 or JAN:'}</label>
<div class="col-lg-5">
<input maxlength="13" type="text" name="ean13" value="{$product->ean13|htmlentitiesUTF8}" />
<span class="help-block">{l s='(Europe, Japan)'}</span>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{$bullet_common_field} {l s='UPC:'}</label>
<div class="col-lg-5">
<input maxlength="12" type="text" name="upc" value="{$product->upc|escape:html:'UTF-8'}" />
<span class="help-block">{l s='(US, Canada)'}</span>
</div>
</div>
{* status informations *}
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<div class="row">
<label class="control-label col-lg-3">{l s='Status:'}</label>
<div class="input-group col-lg-3">
<span class="switch prestashop-switch">
<input onclick="toggleDraftWarning(false);showOptions(true);showRedirectProductOptions(false);" type="radio" name="active" id="active_on" value="1" {if $product->active || !$product->isAssociatedToShop()}checked="checked" {/if} />
<label for="active_on" class="radioCheck">
<i class="icon-check-sign"></i> {l s='Enabled'}
</label>
<input onclick="toggleDraftWarning(true);showOptions(false);showRedirectProductOptions(true);" type="radio" name="active" id="active_off" value="0" {if !$product->active && $product->isAssociatedToShop()}checked="checked"{/if} />
<label for="active_off" class="radioCheck">
<i class="icon-ban-circle"></i> {l s='Disabled'}
</label>
<span class="slide-button btn btn-default"></span>
</span>
</div>
</div>
<div class="row redirect_product_options" style="display:none">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="control-label col-lg-3">{l s='Redirect:'}</label>
<div class="col-lg-5">
<select name="redirect_type" id="redirect_type">
<option value="404" {if $product->redirect_type == '404'} selected="selected" {/if}>{l s='No redirect (404)'}</option>
<option value="301" {if $product->redirect_type == '301'} selected="selected" {/if}>{l s='Redirect permanently (301)'}</option>
<option value="302" {if $product->redirect_type == '302'} selected="selected" {/if}>{l s='Redirect temporarily (302)'}</option>
</select>
<div class="help-block" name="help_box">
<ul>
<li>{l s='404 : Not Found = Product does not exist and no redirect'}</li>
<li>{l s='301 : Moved Permanently = Product Moved Permanently'}</li>
<li>{l s='302 : Moved Temporarily = Product moved temporarily'}</li>
</ul>
</div>
</div>
</div>
<div class="row redirect_product_options redirect_product_options_product_choise" xstyle="display:none">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="control-label col-lg-3">{l s='Related product:'}</label>
<div class="col-lg-5">
<input type="hidden" value="" name="id_product_redirected" />
<input value="" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
</div>
<p>
<script>
var no_related_product = '{l s='No related product'}';
var id_product_redirected = {$product->id_product_redirected|intval};
var product_name_redirected = '{$product_name_redirected|escape:html:'UTF-8'}';
</script>
<span id="related_product_name">{l s='No related product'}</span>
<span id="related_product_remove" style="display:none">
<a hre="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
<img src="../img/admin/delete.gif" class="middle" alt="" />
</a>
</span>
</p>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"}
<label class="control-label col-lg-3">{l s='Visibility:'}</label>
<div class="col-lg-5">
<select name="visibility" id="visibility">
<option value="both" {if $product->visibility == 'both'}selected="selected"{/if} >{l s='Everywhere'}</option>
<option value="catalog" {if $product->visibility == 'catalog'}selected="selected"{/if} >{l s='Catalog only'}</option>
<option value="search" {if $product->visibility == 'search'}selected="selected"{/if} >{l s='Search only'}</option>
<option value="none" {if $product->visibility == 'none'}selected="selected"{/if}>{l s='Nowhere'}</option>
</select>
</div>
</div>
<div id="product_options" class="row" {if !$product->active}style="display:none"{/if} >
<div class="col-lg-12">
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
<div class="row multishop_product_checkbox">
{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}
{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}
{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}
</div>
{/if}
<div class="row">
<label class="control-label col-lg-3">{l s='Options:'}</label>
<div class="col-lg-5">
<p class="checkbox">
<input type="checkbox" name="available_for_order" id="available_for_order" value="1" {if $product->available_for_order}checked="checked"{/if} />
<label for="available_for_order" class="t">{l s='Available for order'}</label>
</p>
<p class="checkbox">
<input type="checkbox" name="show_price" id="show_price" value="1" {if $product->show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/>
<label for="show_price" class="t">{l s='show price'}</label>
</p>
<p class="checkbox">
<input type="checkbox" name="online_only" id="online_only" value="1" {if $product->online_only}checked="checked"{/if} />
<label for="online_only" class="t">{l s='Online only (not sold in store)'}</label>
</p>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"}
<label class="control-label col-lg-3">{l s='Condition:'}</label>
<div class="col-lg-5">
<select name="condition" id="condition">
<option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option>
<option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option>
<option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"}
<label class="control-label col-lg-3">{l s='Short description:'}</label>
<div class="col-lg-5">
{include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description_short' input_value=$product->description_short max=$PS_PRODUCT_SHORT_DESC_LIMIT}
<p class="help-block">({l s='Appears in the product list(s), and on the top of the product page.'})</p>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"}
<label class="control-label col-lg-3">{l s='Description:'}</label>
<div class="col-lg-5">
{include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description' input_value=$product->description}
<p class="help-block">({l s='Appears in the body of the product page'})</p>
</div>
</div>
{if $images}
<div class="alert alert-info">
{l s='Do you want an image associated with the product in your description?'}
<span class="addImageDescription" style="cursor:pointer">{l s='Click here'}</span>.
</div>
<div class="separation"></div>
<br />
<table cellpadding="5" style="width: 50%; float: left; margin-right: 20px; border-right: 1px solid #CCCCCC;">
{* global information *}
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"}
<label>{l s='Name:'}</label>
</td>
<td style="padding-bottom:5px;" class="translatable">
{foreach from=$languages item=language}
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if} float: left;">
<input class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" size="43" type="text" {if !$product->id}disabled="disabled"{/if}
id="name_{$language.id_lang}" name="name_{$language.id_lang}"
value="{$product->name[$language.id_lang]|htmlentitiesUTF8|default:''}"/><sup> *</sup>
<span class="alert alert-info" name="help_box">{l s='Invalid characters:'} <>;=#{}<span class="hint-pointer">&nbsp;</span>
</span>
</div>
{/foreach}
</td>
</tr>
<tr>
<td class="col-left"><label>{$bullet_common_field} {l s='Reference:'}</label></td>
<td style="padding-bottom:5px;">
<input size="55" type="text" name="reference" value="{$product->reference|htmlentitiesUTF8}" style="width: 130px; margin-right: 44px;" />
<span class="alert alert-info" name="help_box">{l s='Special characters allowed:'}.-_#\<span class="hint-pointer">&nbsp;</span></span>
</td>
</tr>
<tr>
<td class="col-left"><label>{$bullet_common_field} {l s='EAN13 or JAN:'}</label></td>
<td style="padding-bottom:5px;">
<input size="55" maxlength="13" type="text" name="ean13" value="{$product->ean13|htmlentitiesUTF8}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(Europe, Japan)'}</span>
</td>
</tr>
<tr>
<td class="col-left"><label>{$bullet_common_field} {l s='UPC:'}</label></td>
<td style="padding-bottom:5px;">
<input size="55" maxlength="12" type="text" name="upc" value="{$product->upc|escape:html:'UTF-8'}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span>
</td>
</tr>
</table>
{* status informations *}
<table cellpadding="5" style="width: 40%; float: left; margin-left: 10px;">
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="text">{l s='Status:'}</label>
</td>
<td style="padding-bottom:5px;">
<ul class="listForm">
<li>
<input onclick="toggleDraftWarning(false);showOptions(true);showRedirectProductOptions(false);" type="radio" name="active" id="active_on" value="1" {if $product->active || !$product->isAssociatedToShop()}checked="checked" {/if} />
<label for="active_on" class="radioCheck">{l s='Enabled'}</label>
</li>
<li>
<input onclick="toggleDraftWarning(true);showOptions(false);showRedirectProductOptions(true);" type="radio" name="active" id="active_off" value="0" {if !$product->active && $product->isAssociatedToShop()}checked="checked"{/if} />
<label for="active_off" class="radioCheck">{l s='Disabled'}</label>
</li>
</ul>
</td>
</tr>
<tr class="redirect_product_options" style="display:none">
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="text">{l s='Redirect:'}</label>
</td>
<td style="padding-bottom:5px;">
<select name="redirect_type" id="redirect_type">
<option value="404" {if $product->redirect_type == '404'} selected="selected" {/if}>{l s='No redirect (404)'}</option>
<option value="301" {if $product->redirect_type == '301'} selected="selected" {/if}>{l s='Redirect permanently (301)'}</option>
<option value="302" {if $product->redirect_type == '302'} selected="selected" {/if}>{l s='Redirect temporarily (302)'}</option>
</select>
<span class="alert alert-info" name="help_box">
{l s='404 : Not Found = Product does not exist and no redirect'}<br/>
{l s='301 : Moved Permanently = Product Moved Permanently'}<br/>
{l s='302 : Moved Temporarily = Product moved temporarily'}
</span>
</td>
</tr>
<tr class="redirect_product_options redirect_product_options_product_choise" style="display:none">
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
<label class="text">{l s='Related product:'}</label>
</td>
<td style="padding-bottom:5px;">
<input type="hidden" value="" name="id_product_redirected" />
<input value="" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
<p>
<script>
var no_related_product = '{l s='No related product'}';
var id_product_redirected = {$product->id_product_redirected|intval};
var product_name_redirected = '{$product_name_redirected|escape:html:'UTF-8'}';
</script>
<span id="related_product_name">{l s='No related product'}</span>
<span id="related_product_remove" style="display:none">
<a hre="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
<img src="../img/admin/delete.gif" class="middle" alt="" />
</a>
</span>
</p>
</td>
</tr>
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"}
<label>{l s='Visibility:'}</label>
</td>
<td style="padding-bottom:5px;">
<select name="visibility" id="visibility">
<option value="both" {if $product->visibility == 'both'}selected="selected"{/if} >{l s='Everywhere'}</option>
<option value="catalog" {if $product->visibility == 'catalog'}selected="selected"{/if} >{l s='Catalog only'}</option>
<option value="search" {if $product->visibility == 'search'}selected="selected"{/if} >{l s='Search only'}</option>
<option value="none" {if $product->visibility == 'none'}selected="selected"{/if}>{l s='Nowhere'}</option>
</select>
</td>
</tr>
<tr id="product_options" {if !$product->active}style="display:none"{/if} >
<td class="col-left">
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
<div class="multishop_product_checkbox">
<ul class="listForm">
<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}</li>
<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}</li>
<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}</li>
</ul>
</div>
{/if}
<div id="createImageDescription" style="display:none">
<label>{l s='Select your image:'}</label>
<label>{l s='Options:'}</label>
</td>
<td style="padding-bottom:5px;">
<ul class="listForm">
<li>
<input type="checkbox" name="available_for_order" id="available_for_order" value="1" {if $product->available_for_order}checked="checked"{/if} />
<label for="available_for_order" class="t">{l s='Available for order'}</label>
</li>
<ul class="smallImage">
{foreach from=$images item=image key=key}
<li>
<input type="checkbox" name="show_price" id="show_price" value="1" {if $product->show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/>
<label for="show_price" class="t">{l s='show price'}</label>
<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
<label for="smallImage_{$key}" class="t">
<img src="{$image.src}" alt="{$image.legend}" />
</label>
</li>
<li>
<input type="checkbox" name="online_only" id="online_only" value="1" {if $product->online_only}checked="checked"{/if} />
<label for="online_only" class="t">{l s='Online only (not sold in store)'}</label>
</li>
</ul>
</td>
</tr>
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"}
<label>{l s='Condition:'}</label>
</td>
<td style="padding-bottom:5px;">
<select name="condition" id="condition">
<option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option>
<option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option>
<option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option>
</select>
</td>
</tr>
</table>
{/foreach}
</ul>
<table cellpadding="5" cellspacing="0" border="0" style="width: 100%;"><tr><td><div class="separation"></div></td></tr></table>
<table cellspacing="0" cellpadding="5" border="0">
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"}
<label>{l s='Short description:'}<br /></label>
<p class="product_description">({l s='Appears in the product list(s), and on the top of the product page.'})</p>
</td>
<td style="padding-bottom:5px;">
{include file="controllers/products/textarea_lang.tpl"
languages=$languages
input_name='description_short'
input_value=$product->description_short
max=$PS_PRODUCT_SHORT_DESC_LIMIT}
<p class="clear"></p>
</td>
</tr>
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"}
<label>{l s='Description:'}<br /></label>
<p class="product_description">({l s='Appears in the body of the product page'})</p>
</td>
<td style="padding-bottom:5px;">
{include file="controllers/products/textarea_lang.tpl" languages=$languages
input_name='description'
input_value=$product->description
}
<p class="clear"></p>
</td>
</tr>
{if $images}
<tr>
<td class="col-left"><label></label></td>
<td style="padding-bottom:5px;">
<div style="display:block;width:620px;" class="alert alert-info">
{l s='Do you want an image associated with the product in your description?'}
<span class="addImageDescription" style="cursor:pointer">{l s='Click here'}</span>.
</div>
<p class="clear"></p>
</td>
</tr>
</table>
<table id="createImageDescription" style="display:none;width:100%">
<tr>
<td colspan="2" height="10"></td>
</tr>
<tr>
<td class="col-left"><label>{l s='Select your image:'}</label></td>
<td style="padding-bottom:5px;">
<ul class="smallImage">
{foreach from=$images item=image key=key}
<li>
<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
<label for="smallImage_{$key}" class="t">
<img src="{$image.src}" alt="{$image.legend}" />
</label>
</li>
{/foreach}
</ul>
<p class="clear"></p>
</td>
</tr>
<tr>
<td class="col-left"><label>{l s='Position:'}</label></td>
<td style="padding-bottom:5px;">
<ul class="listForm">
<li><input type="radio" name="leftRight" id="leftRight_1" value="left" checked>
<label for="leftRight_1" class="t">{l s='left'}</label>
</li>
<li>
<input type="radio" name="leftRight" id="leftRight_2" value="right">
<label for="leftRight_2" class="t">{l s='right'}</label>
</li>
</ul>
</td>
</tr>
<tr>
<td class="col-left"><label>{l s='Select the type of picture:'}</label></td>
<td style="padding-bottom:5px;">
<ul class="listForm">
{foreach from=$imagesTypes key=key item=type}
<li><input type="radio" name="imageTypes" id="imageTypes_{$key}" value="{$type.name}" {if $key == 0}checked="checked"{/if}>
<label for="imageTypes_{$key}" class="t">{$type.name} <span>({$type.width}px {l s='by'} {$type.height}px)</span></label>
</li>
{/foreach}
</ul>
<p class="clear"></p>
</td>
</tr>
<tr>
<td class="col-left"><label>{l s='Image tag to insert:'}</label></td>
<td style="padding-bottom:5px;">
<input type="text" id="resultImage" name="resultImage" />
<p class="preference_description">{l s='The tag to copy/paste into the description.'}</p>
</td>
</tr>
<tr>
<td colspan="2">
<div class="separation"></div>
</td>
</tr>
</table>
{/if}
<table>
<tr>
<td class="col-left"><label>{l s='Tags:'}</label></td>
<td style="padding-bottom:5px;" class="translatable">
{foreach from=$languages item=language}
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if}float: left;">
<input size="55" type="text" id="tags_{$language.id_lang}" name="tags_{$language.id_lang}"
value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" />
<span class="alert alert-info" name="help_box">{l s='Forbidden characters:'} !&lt;;&gt;;?=+#&quot;&deg;{}_$%<span class="hint-pointer">&nbsp;</span></span>
</div>
{/foreach}
<p class="preference_description clear">{l s='Tags separated by commas (e.g. dvd, dvd player, hifi)'}</p>
</td>
</tr>
</table>
</table>
<br />
</div>
<label>{l s='Position:'}</label>
<input type="radio" name="leftRight" id="leftRight_1" value="left" checked>
<label for="leftRight_1" class="t">{l s='left'}</label>
<input type="radio" name="leftRight" id="leftRight_2" value="right">
<label for="leftRight_2" class="t">{l s='right'}</label>
<label>{l s='Select the type of picture:'}</label>
{foreach from=$imagesTypes key=key item=type}
<input type="radio" name="imageTypes" id="imageTypes_{$key}" value="{$type.name}" {if $key == 0}checked="checked"{/if}>
<label for="imageTypes_{$key}" class="t">
{$type.name} <span>({$type.width}px {l s='by'} {$type.height}px)</span>
</label>
{/foreach}
<label>{l s='Image tag to insert:'}</label>
<input type="text" id="resultImage" name="resultImage" />
<p class="help-block">{l s='The tag to copy/paste into the description.'}</p>
</div>
{/if}
<div class="row">
<label class="control-label col-lg-3">{l s='Tags:'}</label>
<div class="col-lg-5 translatable">
{foreach from=$languages item=language}
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if}">
<input type="text" id="tags_{$language.id_lang}" name="tags_{$language.id_lang}"
value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" />
<p class="help-block" name="help_box">{l s='Forbidden characters:'} !&lt;;&gt;;?=+#&quot;&deg;{}_$%</p>
</div>
{/foreach}
<p class="help-block">{l s='Tags separated by commas (e.g. dvd, dvd player, hifi)'}</p>
</div>
</div>
@@ -104,300 +104,358 @@ $(document).ready(function () {
});
</script>
{* END CUSTOMER AUTO-COMPLETE / TO REFACTO *}
<input type="hidden" name="submitted_tabs[]" value="Prices" />
<h4>{l s='Product price'}</h4>
<div class="alert alert-info" style="display:block;min-height:0;">
<h3>{l s='Product price'}</h3>
<div class="alert alert-info">
{l s='You must enter either the pre-tax retail price, or the retail price with tax. The input field will be automatically calculated.'}
</div>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Prices"}
<div class="separation"></div>
<table>
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"}
<label>{l s='Pre-tax wholesale price:'}</label>
</td>
<td style="padding-bottom:5px;">
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{{toolsConvertPrice price=$product->wholesale_price}|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
<p class="preference_description">{l s='Wholesale price'}</p>
</td>
</tr>
{include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"}
<div class="row">
<label class="control-label col-lg-3">{l s='Pre-tax wholesale price:'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input size="11" maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{{toolsConvertPrice price=$product->wholesale_price}|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />
</div>
<p class="help-block">{l s='Wholesale price'}</p>
</div>
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}
<label>{l s='Pre-tax retail price:'}</label>
</td>
<td style="padding-bottom:5px;">
<input type="hidden" id="priceTEReal" name="price" value="{toolsConvertPrice price=$product->price}" />
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{{toolsConvertPrice price=$product->price}|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}
<p class="preference_description">{l s='The pre-tax retail price to sell this product'}</p>
</td>
</tr>
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"}
<label>{l s='Tax rule:'}</label>
</td>
<td style="padding-bottom:5px;">
<script type="text/javascript">
noTax = {if $tax_exclude_taxe_option}true{else}false{/if};
taxesArray = new Array ();
taxesArray[0] = 0;
{foreach $tax_rules_groups as $tax_rules_group}
{if isset($taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']])}
taxesArray[{$tax_rules_group.id_tax_rules_group}] = {$taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']]};
{else}
taxesArray[{$tax_rules_group.id_tax_rules_group}] = 0;
{/if}
{/foreach}
ecotaxTaxRate = {$ecotaxTaxRate / 100};
</script>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}
<label class="control-label col-lg-3">{l s='Pre-tax retail price:'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input type="hidden" id="priceTEReal" name="price" value="{toolsConvertPrice price=$product->price}" />
<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{{toolsConvertPrice price=$product->price}|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />
</div>
<p class="help-block">{l s='The pre-tax retail price to sell this product'}</p>
</div>
<span {if $tax_exclude_taxe_option}style="display:none;"{/if} >
<select onChange="javascript:calcPrice(); unitPriceWithTax('unit');" name="id_tax_rules_group" id="id_tax_rules_group" {if $tax_exclude_taxe_option}disabled="disabled"{/if} >
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"}
<label class="control-label col-lg-3">{l s='Tax rule:'}</label>
<div class="col-lg-8">
<script type="text/javascript">
noTax = {if $tax_exclude_taxe_option}true{else}false{/if};
taxesArray = new Array ();
taxesArray[0] = 0;
{foreach $tax_rules_groups as $tax_rules_group}
{if isset($taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']])}
taxesArray[{$tax_rules_group.id_tax_rules_group}] = {$taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']]};
{else}
taxesArray[{$tax_rules_group.id_tax_rules_group}] = 0;
{/if}
{/foreach}
ecotaxTaxRate = {$ecotaxTaxRate / 100};
</script>
<div class="row">
<div class="col-lg-6">
<select onChange="javascript:calcPrice(); unitPriceWithTax('unit');" name="id_tax_rules_group" id="id_tax_rules_group" {if $tax_exclude_taxe_option}disabled="disabled"{/if} >
<option value="0">{l s='No Tax'}</option>
{foreach from=$tax_rules_groups item=tax_rules_group}
<option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >
{$tax_rules_group['name']|htmlentitiesUTF8}
</option>
{/foreach}
{foreach from=$tax_rules_groups item=tax_rules_group}
<option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >
{$tax_rules_group['name']|htmlentitiesUTF8}
</option>
{/foreach}
</select>
<a class="button" href="{$link->getAdminLink('AdminTaxRulesGroup')|escape:'htmlall':'UTF-8'}&addtax_rules_group&id_product={$product->id}" class="confirm_leave">
<img src="../img/admin/add.gif" alt="{l s='Create'}" title="{l s='Create'}" /> {l s='Create'}
</a>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default" onclick="{$link->getAdminLink('AdminTaxRulesGroup')|escape:'htmlall':'UTF-8'}&addtax_rules_group&id_product={$product->id}" class="confirm_leave" {if $tax_exclude_taxe_option}disabled="disabled"{/if}>
<i class="icon-plus-sign"></i> {l s='Create'}
</button>
</div>
</div>
</div>
</div>
{if $tax_exclude_taxe_option}
<div class="row">
<div class="col-lg-12">
<div class="alert">
{l s='Taxes are currently disabled'} :
<a href="{$link->getAdminLink('AdminTaxes')|escape:'htmlall':'UTF-8'}">{l s='Tax options'}</a>
<input type="hidden" value="{$product->getIdTaxRulesGroup()}" name="id_tax_rules_group" />
</div>
</div>
</div>
{/if}
<div class="row" {if !$ps_use_ecotax} style="display:xnone;"{/if}>
{include file="controllers/products/multishop/checkbox.tpl" field="ecot" type="default"}
<label class="control-label col-lg-3">{l s='Eco-tax (tax incl.):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" id="ecotax" name="ecotax" type="text" value="{$product->ecotax|string_format:'%.2f'}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />
</div>
<span class="help-block">{l s='already included in price'}</span>
</div>
<div class="row" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:xnone;"{/if} >
<label class="control-label col-lg-3">{l s='Retail price with tax:'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input id="priceType" name="priceType" type="hidden" value="TE" />
<input maxlength="14" id="priceTI" type="text" value="" onchange="noComma('priceTI');" onkeyup="$('#priceType').val('TI');if (isArrowKey(event)) return; calcPriceTE();" />
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"}
<label class="control-label col-lg-3">{l s='Unit price:'}</label>
<div class="input-group col-lg-4">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input maxlength="14" id="unit_price" name="unit_price" type="text" value="{$unit_price|string_format:'%.2f'}" onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); unitPriceWithTax('unit');"/>
<span class="input-group-addon">{l s='per'}</span>
<input maxlength="10" id="unity" name="unity" type="text" value="{$product->unity|htmlentitiesUTF8}" onkeyup="if (isArrowKey(event)) return ;unitySecond();" onchange="unitySecond();"/>
</div>
<span class="help-block">{l s='e.g. per lb.'}</span>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert">
{*if $ps_tax && $country_display_tax_label*}
<span>{l s='or'}
{$currency->prefix}<span id="unit_price_with_tax">0.00</span>{$currency->suffix}
{l s='per'} <span id="unity_second">{$product->unity}</span> {l s='with tax'}
</span>
{if $tax_exclude_taxe_option}
<span style="margin-left:10px; color:red;">{l s='Taxes are currently disabled'}</span> (<b><a href="{$link->getAdminLink('AdminTaxes')|escape:'htmlall':'UTF-8'}">{l s='Tax options'}</a></b>)
<input type="hidden" value="{$product->getIdTaxRulesGroup()}" name="id_tax_rules_group" />
{/if}
</td>
</tr>
<tr {if !$ps_use_ecotax} style="display:none;"{/if}>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="ecot" type="default"}
<label>{l s='Eco-tax (tax incl.):'}</label>
</td>
<td>
{$currency->prefix}<input size="11" maxlength="14" id="ecotax" name="ecotax" type="text" value="{$product->ecotax|string_format:'%.2f'}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />{$currency->suffix}
<span style="margin-left:10px">({l s='already included in price'})</span>
</td>
</tr>
<tr {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none"{/if} >
<td class="col-left"><label>{l s='Retail price with tax:'}</label></td>
<td>
{$currency->prefix}<input size="11" maxlength="14" id="priceTI" type="text" value="" onchange="noComma('priceTI');" onkeyup="$('#priceType').val('TI');if (isArrowKey(event)) return; calcPriceTE();" />{$currency->suffix}
<input id="priceType" name="priceType" type="hidden" value="TE" />
</td>
</tr>
<tr id="tr_unit_price">
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"}
<label>{l s='Unit price:'}</label>
</td>
<td>
{$currency->prefix} <input size="11" maxlength="14" id="unit_price" name="unit_price" type="text" value="{$unit_price|string_format:'%.2f'}"
onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); unitPriceWithTax('unit');"/>{$currency->suffix}
{l s='per'}&nbsp;<input size="6" maxlength="10" id="unity" name="unity" type="text" value="{$product->unity|htmlentitiesUTF8}" onkeyup="if (isArrowKey(event)) return ;unitySecond();" onchange="unitySecond();"/>
{if $ps_tax && $country_display_tax_label}
<span style="margin-left:15px">{l s='or'}
{$currency->prefix}<span id="unit_price_with_tax">0.00</span>{$currency->suffix}
{l s='per'} <span id="unity_second">{$product->unity}</span> {l s='with tax'}
</span>
{/if}
<p>{l s='e.g. per lb.'}</p>
</td>
</tr>
<tr>
<td class="col-left">
{include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"}
<label>&nbsp;</label>
</td>
<td>
<input type="checkbox" name="on_sale" id="on_sale" style="padding-top: 5px;" {if $product->on_sale}checked="checked"{/if} value="1" />&nbsp;<label for="on_sale" class="t">{l s='Display the "on sale" icon on the product page, and in the text found within the product listing.'}</label>
</td>
</tr>
<tr>
<td class="col-left"><label><b>{l s='Final retail price:'}</b></label></td>
<td>
{*/if*}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"}
<div class="col-lg-12">
<div class="checkbox">
<label class="control-label" for="on_sale" >
<input type="checkbox" name="on_sale" id="on_sale" {if $product->on_sale}checked="checked"{/if} value="1" />
{l s='Display the "on sale" icon on the product page, and in the text found within the product listing.'}
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert">
<strong>{l s='Final retail price:'}</strong>
<span {if !$country_display_tax_label}style="display:none"{/if} >
{$currency->prefix}<span id="finalPrice" style="font-weight: bold;">0.00</span>{$currency->suffix}<span {if $ps_tax}style="display:none;"{/if}> ({l s='tax incl.'})</span>
{$currency->prefix}
<span id="finalPrice" >0.00</span>
{$currency->suffix}
<span {if $ps_tax}style="display:none;"{/if}> ({l s='tax incl.'})</span>
</span>
<span {if $ps_tax}style="display:none;"{/if} >
{if $country_display_tax_label}
/
/
{/if}
{$currency->prefix}<span id="finalPriceWithoutTax" style="font-weight: bold;"></span>{$currency->suffix} {if $country_display_tax_label}({l s='tax excl.'}){/if}</span>
</td>
</tr>
</table>
<div class="separation"></div>
{$currency->prefix}
<span id="finalPriceWithoutTax"></span>
{$currency->suffix}
{if $country_display_tax_label}({l s='tax excl.'}){/if}
</span>
</div>
</div>
</div>
{if isset($specificPriceModificationForm)}
<h4>{l s='Specific prices'}</h4>
<div class="alert alert-info" style="display:block;min-height:0;">
{l s='You can set specific prices for clients belonging to different groups, different countries, etc...'}
</div>
<br />
<a class="button bt-icon" href="#" id="show_specific_price"><img src="../img/admin/add.gif" alt="" /><span>{l s='Add a new specific price'}</span></a>
<a class="button bt-icon" href="#" id="hide_specific_price" style="display:none"><img src="../img/admin/cross.png" alt=""/><span>{l s='Cancel new specific price'}</span></a>
<br/>
<script type="text/javascript">
<hr/>
<h3>{l s='Specific prices'}</h3>
<div class="alert alert-info">
{l s='You can set specific prices for clients belonging to different groups, different countries, etc...'}
</div>
<a class="btn btn-default" href="#" id="show_specific_price">
<i class="icon-plus-sign"></i> {l s='Add a new specific price'}
</a>
<a class="btn btn-default" href="#" id="hide_specific_price" style="display:none">
<i class="icon-remove"></i> {l s='Cancel new specific price'}
</a>
<script type="text/javascript">
var product_prices = new Array();
{foreach from=$combinations item='combination'}
product_prices['{$combination.id_product_attribute}'] = '{$combination.price}';
{/foreach}
</script>
<div id="add_specific_price" style="display: none;">
<label>{l s='For:'}</label>
{if !$multi_shop}
<div class="margin-form">
<input type="hidden" name="sp_id_shop" value="0" />
{else}
<div class="margin-form">
<select name="sp_id_shop" id="sp_id_shop">
{if !$admin_one_shop}<option value="0">{l s='All shops'}</option>{/if}
{foreach from=$shops item=shop}
<option value="{$shop.id_shop}">{$shop.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
{/if}
<select name="sp_id_currency" id="spm_currency_0" onchange="changeCurrencySpecificPrice(0);">
<option value="0">{l s='All currencies'}</option>
{foreach from=$currencies item=curr}
<option value="{$curr.id_currency}">{$curr.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
<select name="sp_id_country" id="sp_id_country">
<option value="0">{l s='All countries'}</option>
{foreach from=$countries item=country}
<option value="{$country.id_country}">{$country.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
<select name="sp_id_group" id="sp_id_group">
<option value="0">{l s='All groups'}</option>
{foreach from=$groups item=group}
<option value="{$group.id_group}">{$group.name}</option>
{/foreach}
</select>
</script>
<div id="add_specific_price" class="row" style="display: none;">
<div class="col-lg-12">
<div class="row">
<label class="control-label col-lg-3">{l s='For:'}</label>
<div class="col-lg-9">
<div class="row">
{if !$multi_shop}
<input type="hidden" name="sp_id_shop" value="0" />
{else}
<div class="col-lg-3">
<select name="sp_id_shop" id="sp_id_shop">
{if !$admin_one_shop}<option value="0">{l s='All shops'}</option>{/if}
{foreach from=$shops item=shop}
<option value="{$shop.id_shop}">{$shop.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
</div>
{/if}
<div class="col-lg-3">
<select name="sp_id_currency" id="spm_currency_0" onchange="changeCurrencySpecificPrice(0);">
<option value="0">{l s='All currencies'}</option>
{foreach from=$currencies item=curr}
<option value="{$curr.id_currency}">{$curr.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
</div>
<div class="col-lg-3">
<select name="sp_id_country" id="sp_id_country">
<option value="0">{l s='All countries'}</option>
{foreach from=$countries item=country}
<option value="{$country.id_country}">{$country.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
</div>
<div class="col-lg-3">
<select name="sp_id_group" id="sp_id_group">
<option value="0">{l s='All groups'}</option>
{foreach from=$groups item=group}
<option value="{$group.id_group}">{$group.name}</option>
{/foreach}
</select>
</div>
</div>
</div>
</div>
<label>{l s='Customer:'}</label>
<div class="margin-form">
<input type="hidden" name="sp_id_customer" id="id_customer" value="0" />
<input type="text" name="customer" value="{l s='All customers'}" id="customer" autocomplete="off" />
<div class="row">
<label class="control-label col-lg-3">{l s='Customer:'}</label>
<div class="col-lg-9">
<input type="hidden" name="sp_id_customer" id="id_customer" value="0" />
<input type="text" name="customer" value="{l s='All customers'}" id="customer" autocomplete="off" />
</div>
<img src="../img/admin/field-loader.gif" id="customerLoader" alt="{l s='Loading...'}" style="display: none;" />
<div id="customers"></div>
</div>
{if $combinations|@count != 0}
<label>{l s='Combination:'}</label>
<div class="margin-form">
<div class="row">
<label class="control-label col-lg-3">{l s='Combination:'}</label>
<div class="col-lg-4">
<select id="sp_id_product_attribute" name="sp_id_product_attribute">
<option value="0">{l s='Apply to all combinations'}</option>
{foreach from=$combinations item='combination'}
<option value="{$combination.id_product_attribute}">{$combination.attributes}</option>
{/foreach}
{foreach from=$combinations item='combination'}
<option value="{$combination.id_product_attribute}">{$combination.attributes}</option>
{/foreach}
</select>
</div>
</div>
{/if}
<label>{l s='Available from:'}</label>
<div class="margin-form">
<input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" /><span style="font-weight:bold; color:#000000; font-size:12px"> {l s='to'}</span>
<input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" />
<div class="row">
<label class="control-label col-lg-3">{l s='Available from:'}</label>
<div class="input-group col-lg-4">
<input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" />
<span class="input-group-addon">{l s='to'}</span>
<input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{l s='Starting at'}</label>
<div class="input-group col-lg-4">
<span class="input-group-addon">{l s='unit'}</span>
<input type="text" name="sp_from_quantity" value="1" />
</div>
</div>
<label>{l s='Starting at'}</label>
<div class="margin-form">
<input type="text" name="sp_from_quantity" value="1" size="3" /> <span style="font-weight:bold; color:#000000; font-size:12px">{l s='unit'}</span>
</div>
<script type="text/javascript">
$(document).ready(function(){
product_prices['0'] = $('#sp_current_ht_price').html();
<div class="row">
<label>{l s='Product price'}
{if $country_display_tax_label}
{l s='(tax excl.):'}
{/if}
</label>
$('#id_product_attribute').change(function() {
$('#sp_current_ht_price').html(product_prices[$('#id_product_attribute option:selected').val()]);
});
$('#leave_bprice').click(function() {
if (this.checked)
$('#sp_price').attr('disabled', 'disabled');
else
$('#sp_price').removeAttr('disabled');
});
$('.datepicker').datetimepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd',
// Define a custom regional settings in order to use PrestaShop translation tools
currentText: '{l s='Now'}',
closeText: '{l s='Done'}',
ampm: false,
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
timeFormat: 'hh:mm:ss tt',
timeSuffix: '',
timeOnlyTitle: '{l s='Choose Time'}',
timeText: '{l s='Time'}',
hourText: '{l s='Hour'}',
minuteText: '{l s='Minute'}',
});
});
</script>
<label>{l s='Product price'}
{if $country_display_tax_label}
{l s='(tax excl.):'}
{/if}
</label>
<div class="margin-form">
<span id="spm_currency_sign_pre_0" style="font-weight:bold; color:#000000; font-size:12px">
{$currency->prefix}
</span>
<input type="text" disabled="disabled" name="sp_price" id="sp_price" value="{$product->price|string_format:'%.2f'}" size="11" />
<span id="spm_currency_sign_post_0" style="font-weight:bold; color:#000000; font-size:12px">
{$currency->suffix}
</span>
</div>
<label>
{l s='Leave base price:'}
</label>
<div class="margin-form">
<input id="leave_bprice" type="checkbox" value="1" checked="checked" name="leave_bprice" />
</div>
<label>{l s='Apply a discount of:'}</label>
<div class="margin-form">
<input type="text" name="sp_reduction" value="0.00" size="11" />
<select name="sp_reduction_type">
<option selected="selected">---</option>
<option value="amount">{l s='Amount'}</option>
<option value="percentage">{l s='Percentage'}</option>
</select>
<p class="preference_description">{l s='The discount is applied after the tax'}</p>
</div>
</div>
<table style="text-align: left;width:100%" class="table" cellpadding="0" cellspacing="0" id="specific_prices_list">
<!-- WIP -->
<span id="spm_currency_sign_pre_0">{$currency->prefix}</span>
<span id="spm_currency_sign_post_0">{$currency->suffix}</span>
<input type="text" disabled="disabled" name="sp_price" id="sp_price" value="{$product->price|string_format:'%.2f'}" size="11" />
<label>{l s='Leave base price:'}</label>
<input id="leave_bprice" type="checkbox" value="1" checked="checked" name="leave_bprice" />
<label>{l s='Apply a discount of:'}</label>
<input type="text" name="sp_reduction" value="0.00"/>
<select name="sp_reduction_type">
<option selected="selected">---</option>
<option value="amount">{l s='Amount'}</option>
<option value="percentage">{l s='Percentage'}</option>
</select>
<p class="help-block">{l s='The discount is applied after the tax'}</p>
<!-- // WIP -->
</div>
<script type="text/javascript">
$(document).ready(function(){
product_prices['0'] = $('#sp_current_ht_price').html();
$('#id_product_attribute').change(function() {
$('#sp_current_ht_price').html(product_prices[$('#id_product_attribute option:selected').val()]);
});
$('#leave_bprice').click(function() {
if (this.checked)
$('#sp_price').attr('disabled', 'disabled');
else
$('#sp_price').removeAttr('disabled');
});
$('.datepicker').datetimepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd',
// Define a custom regional settings in order to use PrestaShop translation tools
currentText: '{l s='Now'}',
closeText: '{l s='Done'}',
ampm: false,
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
timeFormat: 'hh:mm:ss tt',
timeSuffix: '',
timeOnlyTitle: '{l s='Choose Time'}',
timeText: '{l s='Time'}',
hourText: '{l s='Hour'}',
minuteText: '{l s='Minute'}',
});
});
</script>
<table id="specific_prices_list">
<thead>
<tr>
<th class="cell border" style="width: 12%;">{l s='Rule'}</th>
<th class="cell border" style="width: 12%;">{l s='Combination'}</th>
{if $multi_shop}<th class="cell border" style="width: 12%;">{l s='Shop'}</th>{/if}
<th class="cell border" style="width: 12%;">{l s='Currency'}</th>
<th class="cell border" style="width: 11%;">{l s='Country'}</th>
<th class="cell border" style="width: 13%;">{l s='Group'}</th>
<th class="cell border" style="width: 13%;">{l s='Customer'}</th>
<th class="cell border" style="width: 13%;">{l s='Fixed price'}</th>
<th class="cell border" style="width: 13%;">{l s='Impact'}</th>
<th class="cell border" style="width: 15%;">{l s='Period'}</th>
<th class="cell border" style="width: 13%;">{l s='From (quantity)'}</th>
<th class="cell border" style="width: 2%;">{l s='Action'}</th>
<th class="cell border" >{l s='Rule'}</th>
<th class="cell border" >{l s='Combination'}</th>
{if $multi_shop}<th>{l s='Shop'}</th>{/if}
<th class="cell border">{l s='Currency'}</th>
<th class="cell border">{l s='Country'}</th>
<th class="cell border">{l s='Group'}</th>
<th class="cell border">{l s='Customer'}</th>
<th class="cell border">{l s='Fixed price'}</th>
<th class="cell border">{l s='Impact'}</th>
<th class="cell border">{l s='Period'}</th>
<th class="cell border">{l s='From (quantity)'}</th>
<th class="cell border">{l s='Action'}</th>
</tr>
</thead>
<tbody>
@@ -408,5 +466,4 @@ $(document).ready(function () {
unitPriceWithTax('unit');
});
</script>
{/if}
{/if}
@@ -24,18 +24,20 @@
*}
<div class="translatable">
{foreach from=$languages item=language}
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display:none;{/if}float: left;">
<textarea cols="100" rows="10" id="{$input_name}_{$language.id_lang}"
name="{$input_name}_{$language.id_lang}"
class="autoload_rte" >{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}</textarea>
<span class="counter" max="{if isset($max)}{$max}{else}none{/if}"></span>
<span class="alert alert-info">{$hint|default:''}<span class="hint-pointer">&nbsp;</span></span>
</div>
{/foreach}
{foreach from=$languages item=language}
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display:none;{/if}">
<textarea id="{$input_name}_{$language.id_lang}"
name="{$input_name}_{$language.id_lang}"
class="autoload_rte" >{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}
</textarea>
<span class="counter" max="{if isset($max)}{$max}{else}none{/if}"></span>
<span class="help-block">{$hint|default:''}</span>
</div>
{/foreach}
</div>
<script type="text/javascript">
var iso = '{$iso_tiny_mce}';
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
var ad = '{$ad}';
</script>
</script>
+24 -22
View File
@@ -233,46 +233,48 @@
{/if}
<div id="main" class="page-container row-fluid">
<div class="page-sidebar">
<div class="page-sidebar">
{if !$tab}
<div class="mainsubtablist" style="display:none"></div>
{/if}
<ul id="menu">
{if !$tab}
<div class="mainsubtablist" style="display:none"></div>
{/if}
{foreach $tabs AS $t}
{if $t.active}
{foreach $tabs AS $t}
{if $t.active}
<li class="maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}">
<a href="javascript:adminNav('#maintab{$t.id_tab}');" class="title">
<i class="icon-{$t.class_name}"></i> {if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}
</a>
<ul class="submenu">
{foreach from=$t.sub_tabs item=t2}
{if $t2.active}
<li {if $t2.current} class="active"{/if}>
<a href="{$t2.href|escape:'htmlall':'UTF-8'}">
{if $t2.name eq ''}{$t2.class_name}{else}{$t2.name|escape:'htmlall':'UTF-8'}{/if}
<i class="icon-chevron-sign-right pull-right"></i>
</a>
</li>
{/if}
{/foreach}
{foreach from=$t.sub_tabs item=t2}
{if $t2.active}
<li {if $t2.current} class="active"{/if}>
<a href="{$t2.href|escape:'htmlall':'UTF-8'}">
{if $t2.name eq ''}{$t2.class_name}{else}{$t2.name|escape:'htmlall':'UTF-8'}{/if}
<i class="icon-chevron-sign-right pull-right"></i>
</a>
</li>
{/if}
{/foreach}
</ul>
</li>
{/if}
{/foreach}
{/if}
{/foreach}
</ul>
</div>
<div id="content" class="page-content">
<div class="container-fluid">
<div class="row-fluid">
{if $display_header && $install_dir_exists}
{if $display_header && $install_dir_exists}
<div class="alert alert-block">
{l s='For security reasons, you must also:'}&nbsp;{l s='delete the /install folder'}
</div>
{/if}
{/if}
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
<div class="multishop_toolbar">
<span class="text_multishop">{l s='Multistore configuration for'}</span> {$shop_list}
</div>
{/if}
{/if}
+3 -2
View File
@@ -88,7 +88,8 @@
</div>
{/if}
<div {if !$bootstrap} id="nobootstrap" {/if}>
{if !$bootstrap}<div id="nobootstrap">{/if}
{$page}
</div>
{if !$bootstrap}</div>{/if}
{include file='footer.tpl'}
@@ -60,7 +60,7 @@
var modules_list_loaded = false;
$(function() {
//get reference on save link
btn_save = $('span[class~="process-icon-save"]').parent();
btn_save = $('i[class~="process-icon-save"]').parent();
//get reference on form submit button
btn_submit = $('#{$table}_form_submit_btn');
@@ -68,7 +68,7 @@
if (btn_save.length > 0 && btn_submit.length > 0)
{
//get reference on save and stay link
btn_save_and_stay = $('span[class~="process-icon-save-and-stay"]').parent();
btn_save_and_stay = $('i[class~="process-icon-save-and-stay"]').parent();
//get reference on current save link label
lbl_save = $('#desc-{$table}-save div');
+1 -1
View File
@@ -444,7 +444,7 @@ function handleSaveButtons(e)
{
if (do_not_save == false)
{
$(".leadin").append('<div id="disableSaveMessage" class="warn"></div>');
$(".leadin").append('<div id="disableSaveMessage" class="alert"></div>');
warnDiv = $("#disableSaveMessage");
do_not_save = true;
}
+8 -6
View File
@@ -6,24 +6,26 @@ function tinySetup(config)
default_config = {
mode : "specific_textareas",
theme : "advanced",
skin:"cirkuit",
//skin:"cirkuit",
editor_selector : "rte",
editor_deselector : "noEditor",
plugins : "safari,pagebreak,style,table,advimage,advlink,inlinepopups,media,contextmenu,paste,fullscreen,xhtmlxtras,preview",
// Theme options
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor, media, fullscreen",
// theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons1 : "code,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,|,blockquote,forecolor,backcolor",
//theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor, media, fullscreen",
theme_advanced_buttons2 : "pasteword,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,|,cleanup,|,media,image",
// theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,|,ltr,rtl,|",
// theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,pagebreak",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
//theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
content_css : pathCSS+"global.css",
//content_css : pathCSS+"global.css",
document_base_url : ad,
width: "600",
width: "100%",
height: "auto",
font_size_style_values : "8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt",
elements : "nourlconvert,ajaxfilemanager",