[+] BO : Product tab fieldset and accordion fix

This commit is contained in:
Jerome Nadaud
2013-08-19 18:45:57 +02:00
parent 5336467e04
commit 41190a66d4
8 changed files with 405 additions and 375 deletions
@@ -24,113 +24,115 @@
*}
{if isset($obj->id)}
<input type="hidden" name="submitted_tabs[]" value="Attachments" />
<h3>{l s='Attachment'}</h3>
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Attachments" />
<h3>{l s='Attachment'}</h3>
<div class="row">
<label class="control-label col-lg-3 required" for="attachment_name_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Maximum 32 characters.'}">
{l s='Filename:'}
</span>
</label>
<div class="col-lg-7">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
<div class="row">
<label class="control-label col-lg-3 required" for="attachment_name_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Maximum 32 characters.'}">
{l s='Filename:'}
</span>
</label>
<div class="col-lg-7">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$attachment_name
input_name="attachment_name"
}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attachment_description_{$id_lang}">{l s='Description:'} </label>
<div class="col-lg-9">
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages
input_value=$attachment_name
input_name="attachment_name"
input_name="attachment_description"
input_value=$attachment_description
}
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attachment_description_{$id_lang}">{l s='Description:'} </label>
<div class="col-lg-9">
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages
input_name="attachment_description"
input_value=$attachment_description
}
</div>
</div>
<div class="row">
<label class="control-label col-lg-3" for="attachement_filename">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Upload a file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE|string_format:'%.2f'} {l s='MB max.'})">
{l s='File:'}
</span>
</label>
<div class="col-lg-7">
<div class="row">
<div class="col-lg-8">
<input id="attachement_file" type="file" name="attachment_file" class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="attachement_filename" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn">
<button id="attachement_fileselectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'}
</button>
</span>
<div class="row">
<label class="control-label col-lg-3" for="attachement_filename">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Upload a file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE|string_format:'%.2f'} {l s='MB max.'})">
{l s='File:'}
</span>
</label>
<div class="col-lg-7">
<div class="row">
<div class="col-lg-8">
<input id="attachement_file" type="file" name="attachment_file" class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="attachement_filename" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn">
<button id="attachement_fileselectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'}
</button>
</span>
</div>
</div>
<div class="col-lg-4">
<button type="submit" name="submitAddAttachments" class="btn btn-default">
<i class="icon-cloud-upload"></i> {l s='Upload attachment file'}
</button>
</div>
</div>
<div class="col-lg-4">
<button type="submit" name="submitAddAttachments" class="btn btn-default">
<i class="icon-cloud-upload"></i> {l s='Upload attachment file'}
</button>
</div>
<script>
$(document).ready(function(){
$('#attachement_fileselectbutton').click(function(e){
$('#attachement_file').trigger('click');
});
$('#attachement_file').change(function(e){
var val = $(this).val();
var file = val.split(/[\\/]/);
$('#attachement_filename').val(file[file.length-1]);
});
});
</script>
</div>
<hr/>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="row">
<div class="col-lg-6">
<p>{l s='Available attachments:'}</p>
<select multiple id="selectAttachment2">
{foreach $attach2 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="addAttachment" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-lg-6">
<p>{l s='Attachments for this product:'}</p>
<select multiple id="selectAttachment1" name="attachments[]">
{foreach $attach1 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="removeAttachment" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#attachement_fileselectbutton').click(function(e){
$('#attachement_file').trigger('click');
});
$('#attachement_file').change(function(e){
var val = $(this).val();
var file = val.split(/[\\/]/);
$('#attachement_filename').val(file[file.length-1]);
});
});
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
<script type="text/javascript">
var iso = '{$iso_tiny_mce}';
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
var ad = '{$ad}';
</script>
</div>
<hr/>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="row">
<div class="col-lg-6">
<p>{l s='Available attachments:'}</p>
<select multiple id="selectAttachment2">
{foreach $attach2 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="addAttachment" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-lg-6">
<p>{l s='Attachments for this product:'}</p>
<select multiple id="selectAttachment1" name="attachments[]">
{foreach $attach1 as $attach}
<option value="{$attach.id_attachment}">{$attach.name}</option>
{/foreach}
</select>
<a href="#" id="removeAttachment" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
</div>
</div>
</div>
</div>
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
<script type="text/javascript">
var iso = '{$iso_tiny_mce}';
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
var ad = '{$ad}';
</script>
</fieldset>
{/if}
@@ -24,36 +24,37 @@
*}
{if isset($obj->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Customization" />
<h3>{l s='Add or modify customizable properties.'}</h3>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<label class="control-label col-lg-3" for="uploadable_files">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of upload file fields displayed'}">
{l s='File fields:'}
</span>
</label>
<div class="col-lg-1">
<input type="text" name="uploadable_files" id="uploadable_files" value="{$uploadable_files|htmlentities}" />
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<label class="control-label col-lg-3" for="uploadable_files">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of upload file fields displayed'}">
{l s='File fields:'}
</span>
</label>
<div class="col-lg-1">
<input type="text" name="uploadable_files" id="uploadable_files" value="{$uploadable_files|htmlentities}" />
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
<label class="control-label col-lg-3" for="text_fields">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of text fields displayed'}">
{l s='Text fields:'}
</span>
</label>
<div class="col-lg-1">
<input type="text" name="text_fields" id="text_fields" value="{$text_fields|htmlentities}" />
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
<label class="control-label col-lg-3" for="text_fields">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of text fields displayed'}">
{l s='Text fields:'}
</span>
</label>
<div class="col-lg-1">
<input type="text" name="text_fields" id="text_fields" value="{$text_fields|htmlentities}" />
</div>
</div>
</div>
{if $has_file_labels}
{l s='Define the label of the file fields:'}
@@ -64,5 +65,5 @@
{l s='Define the label of the text fields:'}
{$display_text_labels}
{/if}
</fieldset>
{/if}
@@ -24,6 +24,7 @@
*}
{if isset($product->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Features" />
<h3>{l s='Assign features to this product:'}</h3>
@@ -107,5 +108,5 @@
<a href="{$link->getAdminLink('AdminFeatures')|escape:'htmlall':'UTF-8'}&amp;addfeature" class="btn btn-link confirm_leave button">
<i class="icon-plus-sign"></i> {l s='Add a new feature'} <i class="icon-external-link-sign"></i>
</a>
</fieldset>
{/if}
@@ -24,6 +24,7 @@
*}
{if isset($id_product) && isset($product)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Images" />
<h3 class="tab" >
@@ -328,4 +329,5 @@
});
{/literal}
</script>
</fieldset>
{/if}
@@ -24,215 +24,218 @@
*}
{if isset($product->id)}
<input type="hidden" name="submitted_tabs[]" value="Quantities" />
<h3>{l s='Available quantities for sale'}</h3>
{if !$ps_stock_management}
<div class="alert alert-info">{l s='The stock management is disabled'}</div>
{else}
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"}
<div class="alert alert-info">
{l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}<br/>
{l s='You can choose whether or not to use the advanced stock management system for this product.'}<br/>
{l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}<br/>
{l s='In this case, quantities correspond to the real-stock quantities in the warehouses connected with the current shop, or current group of shops.'}<br/>
{l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}<br/>
{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}
</div>
{if $show_quantities == true}
<div class="alert alert-block" id="available_quantity_ajax_msg" style="display: none;"></div>
<div class="error" id="available_quantity_ajax_error_msg" style="display: none;"></div>
<div class="alert" id="available_quantity_ajax_success_msg" style="display: none;"></div>
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<div class="col-lg-12">
<p class="checkbox">
<label for="advanced_stock_management">
<input type="checkbox" name="advanced_stock_management" class="advanced_stock_management" id="advanced_stock_management"
{if $product->advanced_stock_management == 1 && $stock_management_active == 1}
value="1" checked="checked"
{else}
value="0"
{/if}
{if $stock_management_active == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='I want to use the advanced stock management system for this product.'}
{if $stock_management_active == 0 && !$product->cache_is_pack}&nbsp;-&nbsp;<strong>{l s='This requires you to enable advanced stock management.'}</strong>
{else if $product->cache_is_pack}&nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
</div>
</div>
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<label class="control-label col-lg-3" for="depends_on_stock_1">{l s='Available quantities:'}</label>
<div class="col-lg-9">
<p class="radio">
<label for="depends_on_stock_1">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"
{if $product->depends_on_stock == 1 && $stock_management_active == 1}
checked="checked"
{/if}
{if $stock_management_active == 0 || $product->advanced_stock_management == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='Available quantities for current product and its combinations are based on warehouse stock. '}
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack} &nbsp;-&nbsp;{l s='This requires you to enable advanced stock management globally or for this product.'}
{else if $product->cache_is_pack} &nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
<p class="radio">
<label for="depends_on_stock_0" for="depends_on_stock_0">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_0" value="0"
{if $product->depends_on_stock == 0 || $stock_management_active == 0}
checked="checked"
{/if}
/>
{l s='I want to specify available quantities manually.'}
</label>
</p>
</div>
</div>
{if isset($pack_quantity)}
<div class="alert alert-info">
<p>{l s='When a product has combinations, quantities will be based on the default combination.'}</p>
<p>{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}</p>
</div>
{/if}
<table class="table">
<colgroup>
<col width="50">
<col>
</colgroup>
<thead>
<tr>
<th>{l s='Quantity'}</th>
<th>{l s='Designation'}</th>
</tr>
</thead>
{foreach from=$attributes item=attribute}
<tr>
<td class="available_quantity" id="qty_{$attribute['id_product_attribute']}">
<span>{$available_quantity[$attribute['id_product_attribute']]}</span>
<input type="text" value="{$available_quantity[$attribute['id_product_attribute']]|htmlentities}"/>
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
</tr>
{/foreach}
</table>
<div id="when_out_of_stock" class="row">
<label class="control-label col-lg-3">{l s='When out of stock:'}</label>
<div class="col-lg-9">
<p class="checkbox">
<label id="label_out_of_stock_1" for="out_of_stock_1">
<input {if $product->out_of_stock == 0} checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock">
{l s='Deny orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_2" for="out_of_stock_2">
<input {if $product->out_of_stock == 1} checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock">
{l s='Allow orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_3" for="out_of_stock_3">
<input {if $product->out_of_stock == 2} checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock">
{l s='Default'}:
{if $order_out_of_stock == 1}
{l s='Allow orders'}
{else}
{l s='Deny orders'}
{/if}
<a class="confirm_leave" href="index.php?tab=AdminPPreferences&token={$token_preferences}">
{l s='as set in Preferences'}
</a>
</label>
</p>
</div>
</div>
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Quantities" />
<h3>{l s='Available quantities for sale'}</h3>
{if !$ps_stock_management}
<div class="alert alert-info">{l s='The stock management is disabled'}</div>
{else}
<div class="alert alert-block">
<p>{l s='It is not possible to manage quantities when:'}</p>
<ul>
<li>{l s='You are currently managing all of your shops.'}</li>
<li>{l s='You are currently managing a group of shops where quantities are not shared between every shop in this group.'}</li>
<li>{l s='You are currently managing a shop that is in a group where quantities are shared between every shop in this group.'}</li>
</ul>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"}
<div class="alert alert-info">
{l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}<br/>
{l s='You can choose whether or not to use the advanced stock management system for this product.'}<br/>
{l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}<br/>
{l s='In this case, quantities correspond to the real-stock quantities in the warehouses connected with the current shop, or current group of shops.'}<br/>
{l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}<br/>
{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}
</div>
{/if}
{/if}
<h3>{l s='Availability settings'}</h3>
{if $show_quantities == true}
<div class="alert alert-block" id="available_quantity_ajax_msg" style="display: none;"></div>
<div class="error" id="available_quantity_ajax_error_msg" style="display: none;"></div>
<div class="alert" id="available_quantity_ajax_success_msg" style="display: none;"></div>
{if !$has_attribute}
<div class="row">
<label class="control-label col-lg-3" for="minimal_quantity">{l s='Minimum quantity:'}</label>
<div class="col-lg-1">
<input maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$product->minimal_quantity|default:1}" />
</div>
<p class="help-block">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
</div>
{/if}
{if $ps_stock_management}
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
<div class="row">
<label class="control-label col-lg-5" for="available_now_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when in-stock:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->available_now
input_name='available_now'}
</div>
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
<label class="control-label col-lg-5" for="available_later_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when back-ordereding is allowed:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->available_later
input_name='available_later'}
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<div class="col-lg-12">
<p class="checkbox">
<label for="advanced_stock_management">
<input type="checkbox" name="advanced_stock_management" class="advanced_stock_management" id="advanced_stock_management"
{if $product->advanced_stock_management == 1 && $stock_management_active == 1}
value="1" checked="checked"
{else}
value="0"
{/if}
{if $stock_management_active == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='I want to use the advanced stock management system for this product.'}
{if $stock_management_active == 0 && !$product->cache_is_pack}&nbsp;-&nbsp;<strong>{l s='This requires you to enable advanced stock management.'}</strong>
{else if $product->cache_is_pack}&nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
</div>
</div>
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<label class="control-label col-lg-3" for="depends_on_stock_1">{l s='Available quantities:'}</label>
<div class="col-lg-9">
<p class="radio">
<label for="depends_on_stock_1">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"
{if $product->depends_on_stock == 1 && $stock_management_active == 1}
checked="checked"
{/if}
{if $stock_management_active == 0 || $product->advanced_stock_management == 0 || $product->cache_is_pack}
disabled="disabled"
{/if}
/>
{l s='Available quantities for current product and its combinations are based on warehouse stock. '}
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack} &nbsp;-&nbsp;{l s='This requires you to enable advanced stock management globally or for this product.'}
{else if $product->cache_is_pack} &nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
</label>
</p>
<p class="radio">
<label for="depends_on_stock_0" for="depends_on_stock_0">
<input type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_0" value="0"
{if $product->depends_on_stock == 0 || $stock_management_active == 0}
checked="checked"
{/if}
/>
{l s='I want to specify available quantities manually.'}
</label>
</p>
</div>
</div>
{if isset($pack_quantity)}
<div class="alert alert-info">
<p>{l s='When a product has combinations, quantities will be based on the default combination.'}</p>
<p>{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}</p>
</div>
{/if}
<table class="table">
<colgroup>
<col width="50">
<col>
</colgroup>
<thead>
<tr>
<th>{l s='Quantity'}</th>
<th>{l s='Designation'}</th>
</tr>
</thead>
{foreach from=$attributes item=attribute}
<tr>
<td class="available_quantity" id="qty_{$attribute['id_product_attribute']}">
<span>{$available_quantity[$attribute['id_product_attribute']]}</span>
<input type="text" value="{$available_quantity[$attribute['id_product_attribute']]|htmlentities}"/>
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
</tr>
{/foreach}
</table>
<div id="when_out_of_stock" class="row">
<label class="control-label col-lg-3">{l s='When out of stock:'}</label>
<div class="col-lg-9">
<p class="checkbox">
<label id="label_out_of_stock_1" for="out_of_stock_1">
<input {if $product->out_of_stock == 0} checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock">
{l s='Deny orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_2" for="out_of_stock_2">
<input {if $product->out_of_stock == 1} checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock">
{l s='Allow orders'}
</label>
</p>
<p class="checkbox">
<label id="label_out_of_stock_3" for="out_of_stock_3">
<input {if $product->out_of_stock == 2} checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock">
{l s='Default'}:
{if $order_out_of_stock == 1}
{l s='Allow orders'}
{else}
{l s='Deny orders'}
{/if}
<a class="confirm_leave" href="index.php?tab=AdminPPreferences&token={$token_preferences}">
{l s='as set in Preferences'}
</a>
</label>
</p>
</div>
</div>
{else}
<div class="alert alert-block">
<p>{l s='It is not possible to manage quantities when:'}</p>
<ul>
<li>{l s='You are currently managing all of your shops.'}</li>
<li>{l s='You are currently managing a group of shops where quantities are not shared between every shop in this group.'}</li>
<li>{l s='You are currently managing a shop that is in a group where quantities are shared between every shop in this group.'}</li>
</ul>
</div>
{/if}
{/if}
</fieldset>
<fieldset>
<h3>{l s='Availability settings'}</h3>
{if !$has_attribute}
<div class="row">
<label class="control-label col-lg-3" for="minimal_quantity">{l s='Minimum quantity:'}</label>
<div class="col-lg-1">
<input maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$product->minimal_quantity|default:1}" />
</div>
<p class="help-block">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
</div>
{/if}
{if $ps_stock_management}
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
<div class="row">
<label class="control-label col-lg-5" for="available_now_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when in-stock:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->available_now
input_name='available_now'}
</div>
</div>
</div>
</div>
{if !$countAttributes}
<label for="available_date">{l s='Available date:'}</label>
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker" type="text" />
<p>{l s='The available date when this product is out of stock.'}</p>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
<label class="control-label col-lg-5" for="available_later_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when back-ordereding is allowed:'}
</span>
</label>
<div class="col-lg-5">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->available_later
input_name='available_later'}
</div>
</div>
</div>
{if !$countAttributes}
<label for="available_date">{l s='Available date:'}</label>
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker" type="text" />
<p>{l s='The available date when this product is out of stock.'}</p>
{/if}
{/if}
{/if}
<script type="text/javascript">
var quantities_ajax_success = '{l s='Data saved'}';
var quantities_ajax_waiting = '{l s='Saving data...'}';
</script>
<script type="text/javascript">
var quantities_ajax_success = '{l s='Data saved'}';
var quantities_ajax_waiting = '{l s='Saving data...'}';
</script>
</fieldset>
{/if}
{*$default_language*}
@@ -25,6 +25,7 @@
<input type="hidden" name="supplier_loaded" value="1">
{if isset($product->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Suppliers" />
<h3>{l s='Suppliers of the current product'}</h3>
<div class="alert alert-info">
@@ -60,7 +61,8 @@
<a class="btn btn-link bt-icon confirm_leave" href="{$link->getAdminLink('AdminSuppliers')|escape:'htmlall':'UTF-8'}&addsupplier">
<i class="icon-plus"></i> {l s='Create a new supplier'} <i class="icon-external-link-sign"></i>
</a>
</fieldset>
<fieldset>
<h3>{l s='Product reference(s)'}</h3>
<div class="alert alert-info">
@@ -130,4 +132,5 @@
</div>
{/foreach}
</div>
</fieldset>
{/if}
@@ -25,8 +25,9 @@
<input type="hidden" name="warehouse_loaded" value="1">
{if isset($product->id)}
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Warehouses" />
<h4>{l s='Product location in warehouses'}</h4>
<h3>{l s='Product location in warehouses'}</h3>
<div class="separation"></div>
<div class="alert alert-info" style="display:block; position:'auto';">
<p>{l s='This interface allows you to specify the warehouse in which the product is stocked.'}</p>
@@ -38,51 +39,57 @@
<img src="../img/admin/add.gif" alt="{l s='Create a new warehouse'}" title="{l s='Create a new warehouse'}" /><span>{l s='Create a new warehouse'}</span>
</a>
<div id="warehouse_accordion" style="margin-top:10px; display:block;">
<div id="warehouse_accordion">
{foreach from=$warehouses item=warehouse}
<h3 style="margin-bottom:0;"><a href="#">{$warehouse['name']}</a></h3>
<div style="display:block;">
<table cellpadding="10" cellspacing="0" class="table">
<tr>
<th width="100">{l s='Stored'}</th>
<th>{l s='Product'}</th>
<th width="150">{l s='Location (optional)'}</th>
</tr>
{foreach $attributes AS $index => $attribute}
{assign var=location value=''}
{assign var=selected value=''}
{foreach from=$associated_warehouses item=aw}
{if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']}
{assign var=location value=$aw->location}
{assign var=selected value=true}
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#warehouse-{$warehouse['name']}">{$warehouse['name']}</a>
</div>
<div id="warehouse-{$warehouse['name']}" class="accordion-body collapse in">
<div class="accordion-inner">
<table cellpadding="10" cellspacing="0" class="table">
<tr>
<th width="100">{l s='Stored'}</th>
<th>{l s='Product'}</th>
<th width="150">{l s='Location (optional)'}</th>
</tr>
{foreach $attributes AS $index => $attribute}
{assign var=location value=''}
{assign var=selected value=''}
{foreach from=$associated_warehouses item=aw}
{if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']}
{assign var=location value=$aw->location}
{assign var=selected value=true}
{/if}
{/foreach}
<tr {if $index is odd}class="alt_row"{/if}>
<td><input type="checkbox"
name="check_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
{if $selected == true}checked="checked"{/if}
value="1" />
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
<td><input type="text"
name="location_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
value="{$location|escape:'htmlall':'UTF-8'}"
size="20" />
</td>
</tr>
{/foreach}
<tr>
<td colspan="3">&nbsp;</td>
</tr>
{if $attributes|@count gt 1}
<tr>
<td><input type="checkbox" class="check_all_warehouse" value="check_warehouse_{$warehouse['id_warehouse']}" /></td>
<td colspan="2"><i>{l s='Mark all products as stored in this warehouse.'}</i></td>
</tr>
{/if}
{/foreach}
<tr {if $index is odd}class="alt_row"{/if}>
<td><input type="checkbox"
name="check_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
{if $selected == true}checked="checked"{/if}
value="1" />
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
<td><input type="text"
name="location_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
value="{$location|escape:'htmlall':'UTF-8'}"
size="20" />
</td>
</tr>
{/foreach}
<tr>
<td colspan="3">&nbsp;</td>
</tr>
{if $attributes|@count gt 1}
<tr>
<td><input type="checkbox" class="check_all_warehouse" value="check_warehouse_{$warehouse['id_warehouse']}" /></td>
<td colspan="2"><i>{l s='Mark all products as stored in this warehouse.'}</i></td>
</tr>
{/if}
</table>
</table>
</div>
</div>
</div>
{/foreach}
</div>
<p>&nbsp;</p>
<fieldset>
{/if}