// update order tab
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<table class="table table-hover" width="100%;" cellspacing="0" cellpadding="0" id="documents_table">
|
||||
<table class="table" id="documents_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10%">
|
||||
|
||||
@@ -27,80 +27,78 @@
|
||||
|
||||
{block name="input"}
|
||||
{if $input.type == 'text_customer'}
|
||||
<span class="normal-text">{$customer->firstname} {$customer->lastname}</span>
|
||||
<p style="clear: both">
|
||||
<a href="{$url_customer}">{l s='View details on the customer page'}</a>
|
||||
<span>{$customer->firstname} {$customer->lastname}</span>
|
||||
<p>
|
||||
<a class="text-muted" href="{$url_customer}">{l s='View details on the customer page'}</a>
|
||||
</p>
|
||||
{elseif $input.type == 'text_order'}
|
||||
<span class="normal-text">{$text_order}</span>
|
||||
<p style="clear: both">
|
||||
<a href="{$url_order}">{l s='View details on the order page'}</a>
|
||||
<span>{$text_order}</span>
|
||||
<p>
|
||||
<a class="text-muted" href="{$url_order}">{l s='View details on the order page'}</a>
|
||||
</p>
|
||||
{elseif $input.type == 'list_products'}
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="col-left"> </td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" class="table">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Reference'}</th>
|
||||
<th>{l s='Product name'}</th>
|
||||
<th class="text-center">{l s='Quantity'}</th>
|
||||
<th class="text-center">{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $returnedCustomizations as $returnedCustomization}
|
||||
<tr>
|
||||
<th style="width: 100px;">{l s='Reference'}</th>
|
||||
<th>{l s='Product name'}</th>
|
||||
<th>{l s='Quantity'}</th>
|
||||
<th>{l s='Action'}</th>
|
||||
<td>{$returnedCustomization['reference']}</td>
|
||||
<td>{$returnedCustomization['name']}</td>
|
||||
<td class="text-center">{$returnedCustomization['product_quantity']|intval}</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-default" href="{$current}&deleteorder_return_detail&id_order_detail={$returnedCustomization['id_order_detail']}&id_order_return={$id_order_return}&id_customization={$returnedCustomization['id_customization']}&token={$token}">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{foreach $returnedCustomizations as $returnedCustomization}
|
||||
{foreach $customizationDatas as $type => $datas}
|
||||
<tr>
|
||||
<td>{$returnedCustomization['reference']}</td>
|
||||
<td class="center">{$returnedCustomization['name']}</td>
|
||||
<td class="center">{$returnedCustomization['product_quantity']|intval}</td>
|
||||
<td class="center">
|
||||
<a href="{$current}&deleteorder_return_detail&id_order_detail={$returnedCustomization['id_order_detail']}&id_order_return={$id_order_return}&id_customization={$returnedCustomization['id_customization']}&token={$token}">
|
||||
<img src="../img/admin/delete.gif">
|
||||
<td colspan="4">
|
||||
{if $type == 'type_file'}
|
||||
<ul>
|
||||
{foreach $datas a $data name='loop'}
|
||||
<li>
|
||||
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$loop.iteration}" target="_blank"><img src="{$picture_folder}{$data['value']}_small" alt="" /></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{elseif $type == 'type_textfield'}
|
||||
<ul>
|
||||
{foreach $datas as $data name='loop'}
|
||||
<li>{if $data['name']}$data['name']{else}{l s='Text #%d' sprintf=$loop.iteration}{/if}{l s=':'} {$data['value']}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
|
||||
{* Classic products *}
|
||||
{foreach $products as $k => $product}
|
||||
{if !isset($quantityDisplayed[$product['id_order_detail']]) || $product['product_quantity']|intval > $quantityDisplayed[$product['id_order_detail']]|intval}
|
||||
<tr>
|
||||
<td>{$product['product_reference']}</td>
|
||||
<td class="text-center">{$product['product_name']}</td>
|
||||
<td class="text-center">{$product['product_quantity']}</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-default" href="{$current}&deleteorder_return_detail&id_order_detail={$product['id_order_detail']}&id_order_return={$id_order_return}&token={$token}">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{foreach $customizationDatas as $type => $datas}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{if $type == 'type_file'}
|
||||
<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">
|
||||
{foreach $datas a $data name='loop'}
|
||||
<li style="display: inline; margin: 2px;">
|
||||
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$loop.iteration}" target="_blank"><img src="{$picture_folder}{$data['value']}_small" alt="" /></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{elseif $type == 'type_textfield'}
|
||||
<ul style="margin: 0px 0px 4px 0px; padding: 0px 0px 0px 6px; list-style-type: none;">
|
||||
{foreach $datas as $data name='loop'}
|
||||
<li>{if $data['name']}$data['name']{else}{l s='Text #%d' sprintf=$loop.iteration}{/if}{l s=':'} {$data['value']}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
|
||||
{* Classic products *}
|
||||
{foreach $products as $k => $product}
|
||||
{if !isset($quantityDisplayed[$product['id_order_detail']]) || $product['product_quantity']|intval > $quantityDisplayed[$product['id_order_detail']]|intval}
|
||||
<tr>
|
||||
<td>{$product['product_reference']}</td>
|
||||
<td class="center">{$product['product_name']}</td>
|
||||
<td class="center">{$product['product_quantity']}</td>
|
||||
<td class="center">
|
||||
<a href="{$current}&deleteorder_return_detail&id_order_detail={$product['id_order_detail']}&id_order_return={$id_order_return}&token={$token}">
|
||||
<img src="../img/admin/delete.gif">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
*}
|
||||
|
||||
{* Generate HTML code for printing OrderSlip Icon with link *}
|
||||
<span style="width:20px; margin-right:5px;">
|
||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$order_slip->id}"><img src="../img/admin/tab-invoice.gif" alt="order_slip" /></a>
|
||||
</span>
|
||||
|
||||
<a class="btn btn-default" target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$order_slip->id}">
|
||||
<i class="icon-file-text"></i>
|
||||
{l s='Download credit slip'}
|
||||
</a>
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
</th>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<th class="center">{l s='Actions'}{if !$simple_header}{/if}</th>
|
||||
<th>{l s='Actions'}{if !$simple_header}{/if}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
{if !$simple_header}
|
||||
@@ -208,7 +208,7 @@
|
||||
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
</select>
|
||||
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
||||
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/><br />
|
||||
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
||||
{l s='To'} <input type="text" class="filter datepicker" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.filter_key)}
|
||||
|
||||
@@ -38,178 +38,204 @@
|
||||
{if isset($categoryData['name'])} name={$categoryData['name']}{/if}
|
||||
{if isset($categoryData['id'])} id={$categoryData['id']} {/if}
|
||||
method="post"
|
||||
enctype="multipart/form-data">
|
||||
enctype="multipart/form-data" class="form-horizontal">
|
||||
{foreach $option_list AS $category => $categoryData}
|
||||
{if isset($categoryData['top'])}{$categoryData['top']}{/if}
|
||||
<fieldset {if isset($categoryData['class'])}class="{$categoryData['class']}"{/if}>
|
||||
{* Options category title *}
|
||||
<legend>
|
||||
<img src="{$categoryData['image']}"/>
|
||||
{if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if}
|
||||
</legend>
|
||||
<fieldset {if isset($categoryData['class'])}class="{$categoryData['class']}"{/if} class="col-lg-12">
|
||||
{* Options category title *}
|
||||
<legend>
|
||||
<img src="{$categoryData['image']}"/>
|
||||
{if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if}
|
||||
</legend>
|
||||
|
||||
{* Category description *}
|
||||
{if (isset($categoryData['description']) && $categoryData['description'])}
|
||||
<div class="optionsDescription">{$categoryData['description']}</div>
|
||||
{/if}
|
||||
{* Category info *}
|
||||
{if (isset($categoryData['info']) && $categoryData['info'])}
|
||||
<p>{$categoryData['info']}</p>
|
||||
{/if}
|
||||
|
||||
{if !$categoryData['hide_multishop_checkbox'] && $use_multishop}
|
||||
<input type="checkbox" style="vertical-align: text-top" onclick="checkAllMultishopDefaultValue(this)" /> <b>{l s='Check/uncheck all'}</b> {l s='(Check boxes if you want to set a custom value for this shop or group shop context)'}
|
||||
<div class="separation"></div>
|
||||
{/if}
|
||||
|
||||
{foreach $categoryData['fields'] AS $key => $field}
|
||||
{if $field['type'] == 'hidden'}
|
||||
<input type="hidden" name="{$key}" value="{$field['value']}" />
|
||||
{else}
|
||||
<div style="clear: both; padding-top:15px;" id="conf_id_{$key}" {if $field['is_invisible']} class="isInvisible"{/if}>
|
||||
{if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
|
||||
<div class="preference_default_multishop">
|
||||
<input type="checkbox" name="multishopOverrideOption[{$key}]" value="1" {if !$field['is_disabled']}checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
|
||||
</div>
|
||||
{/if}
|
||||
{block name="label"}
|
||||
{if isset($field['title'])}
|
||||
<label class="conf_title">
|
||||
{$field['title']}</label>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="field"}
|
||||
<div class="margin-form">
|
||||
{block name="input"}
|
||||
{if $field['type'] == 'select'}
|
||||
{if $field['list']}
|
||||
<select name="{$key}"{if isset($field['js'])} onchange="{$field['js']}"{/if} id="{$key}" {if isset($field['size'])} size="{$field['size']}"{/if}>
|
||||
{foreach $field['list'] AS $k => $option}
|
||||
<option value="{$option[$field['identifier']]}"{if $field['value'] == $option[$field['identifier']]} selected="selected"{/if}>{$option['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else if isset($input.empty_message)}
|
||||
{$input.empty_message}
|
||||
{/if}
|
||||
{elseif $field['type'] == 'bool'}
|
||||
<label class="t" for="{$key}_on"><img src="../img/admin/enabled.gif" alt="{l s='Yes'}" title="{l s='Yes'}" /></label>
|
||||
<input type="radio" name="{$key}" id="{$key}_on" value="1" {if $field['value']} checked="checked"{/if}{if isset($field['js']['on'])} {$field['js']['on']}{/if}/>
|
||||
<label class="t" for="{$key}_on"> {l s='Yes'}</label>
|
||||
<label class="t" for="{$key}_off"><img src="../img/admin/disabled.gif" alt="{l s='No'}" title="{l s='No'}" style="margin-left: 10px;" /></label>
|
||||
<input type="radio" name="{$key}" id="{$key}_off" value="0" {if !$field['value']} checked="checked"{/if}{if isset($field['js']['off'])} {$field['js']['off']}{/if}/>
|
||||
<label class="t" for="{$key}_off"> {l s='No'}</label>
|
||||
{elseif $field['type'] == 'radio'}
|
||||
{foreach $field['choices'] AS $k => $v}
|
||||
<input type="radio" name="{$key}" id="{$key}_{$k}" value="{$k}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
|
||||
<label class="t" for="{$key}_{$k}"> {$v}</label><br />
|
||||
{/foreach}
|
||||
<br />
|
||||
{elseif $field['type'] == 'checkbox'}
|
||||
{foreach $field['choices'] AS $k => $v}
|
||||
<input type="checkbox" name="{$key}" id="{$key}{$k}_on" value="{$k|intval}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
|
||||
<label class="t" for="{$key}{$k}_on"> {$v}</label><br />
|
||||
{/foreach}
|
||||
<br />
|
||||
{elseif $field['type'] == 'text'}
|
||||
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
|
||||
{if isset($field['suffix'])} {$field['suffix']|strval}{/if}
|
||||
{elseif $field['type'] == 'password'}
|
||||
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if} />
|
||||
{if isset($field['suffix'])} {$field['suffix']|strval}{/if}
|
||||
{elseif $field['type'] == 'textarea'}
|
||||
<textarea name={$key} cols="{$field['cols']}" rows="{$field['rows']}">{$field['value']|escape:'htmlall':'UTF-8'}</textarea>
|
||||
{elseif $field['type'] == 'file'}
|
||||
{if isset($field['thumb']) && $field['thumb']}
|
||||
<img src="{$field['thumb']}" alt="{$field['title']}" title="{$field['title']}" /><br />
|
||||
{/if}
|
||||
<input type="file" name="{$key}" />
|
||||
{elseif $field['type'] == 'color'}
|
||||
<input type="color"
|
||||
size="{$field['size']}"
|
||||
data-hex="true"
|
||||
{if isset($input.class)}class="{$field['class']}"
|
||||
{else}class="color mColorPickerInput"{/if}
|
||||
name="{$field['name']}"
|
||||
class="{if isset($field['class'])}{$field['class']}{/if}"
|
||||
value="{$field['value']|escape:'htmlall':'UTF-8'}" />
|
||||
{elseif $field['type'] == 'price'}
|
||||
{$currency_left_sign}<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" />{$currency_right_sign} {l s='(tax excl.)'}
|
||||
{elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang' || $field['type'] == 'selectLang'}
|
||||
{if $field['type'] == 'textLang'}
|
||||
{foreach $field['languages'] AS $id_lang => $value}
|
||||
<div id="{$key}_{$id_lang}" style="margin-bottom:8px; display: {if $id_lang == $current_id_lang}block{else}none{/if}; float: left; vertical-align: top;">
|
||||
<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}_{$id_lang}" value="{$value|escape:'htmlall':'UTF-8'}" />
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif $field['type'] == 'textareaLang'}
|
||||
{foreach $field['languages'] AS $id_lang => $value}
|
||||
<div id="{$key}_{$id_lang}" style="display: {if $id_lang == $current_id_lang}block{else}none{/if}; float: left;">
|
||||
<textarea rows="{$field['rows']}" cols="{$field['cols']|intval}" name="{$key}_{$id_lang}">{$value|replace:'\r\n':"\n"}</textarea>
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif $field['type'] == 'selectLang'}
|
||||
{foreach $languages as $language}
|
||||
<div id="{$key}_{$language.id_lang}" style="margin-bottom:8px; display: {if $language.id_lang == $current_id_lang}block{else}none{/if}; float: left; vertical-align: top;">
|
||||
<select name="{$key}_{$language.iso_code|upper}">
|
||||
{foreach $field['list'] AS $k => $v}
|
||||
<option value="{if isset($v.cast)}{$v.cast[$v[$field.identifier]]}{else}{$v[$field.identifier]}{/if}"
|
||||
{if $field['value'][$language.id_lang] == $v['name']} selected="selected"{/if}>
|
||||
{$v['name']}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{if count($languages) > 1}
|
||||
<div class="displayed_flag">
|
||||
<img src="../img/l/{$current_id_lang}.jpg"
|
||||
class="pointer"
|
||||
id="language_current_{$key}"
|
||||
onclick="toggleLanguageFlags(this);" />
|
||||
</div>
|
||||
<div id="languages_{$key}" class="language_flags">
|
||||
{l s='Choose language:'}<br /><br />
|
||||
{foreach $languages as $language}
|
||||
<img src="../img/l/{$language.id_lang}.jpg"
|
||||
class="pointer"
|
||||
alt="{$language.name}"
|
||||
title="{$language.name}"
|
||||
onclick="changeLanguage('{$key}', '{if isset($custom_key)}{$custom_key}{else}{$key}{/if}', {$language.id_lang}, '{$language.iso_code}');" />
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
<br style="clear:both">
|
||||
{/if}
|
||||
|
||||
{if isset($field['required']) && $field['required'] && $field['type'] != 'radio'}
|
||||
<sup>*</sup>
|
||||
{/if}
|
||||
{if isset($field['hint'])}<span class="alert alert-info" name="help_box">{$field['hint']}<span class="hint-pointer"> </span></span>{/if}
|
||||
{/block}{* end block input *}
|
||||
{if isset($field['desc'])}<p class="preference_description">{$field['desc']}</p>{/if}
|
||||
{if $field['is_invisible']}<p class="alert alert-block">{l s='You can\'t change the value of this configuration field in the context of this shop.'}</p>{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{/block}{* end block field *}
|
||||
{* Category description *}
|
||||
{if (isset($categoryData['description']) && $categoryData['description'])}
|
||||
<div class="optionsDescription">{$categoryData['description']}</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if isset($categoryData['submit'])}
|
||||
<div class="margin-form">
|
||||
<input type="submit"
|
||||
value="{if isset($categoryData['submit']['title'])}{$categoryData['submit']['title']}{else}{l s='Save'}{/if}"
|
||||
name="{if isset($categoryData['submit']['name'])}{$categoryData['submit']['name']}{else}submitOptions{$table}{/if}"
|
||||
class="{if isset($categoryData['submit']['class'])}{$categoryData['submit']['class']}{else}button{/if}"
|
||||
id="{$table}_form_submit_btn"
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($categoryData['required_fields']) && $categoryData['required_fields']}
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
{/if}
|
||||
{if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if}
|
||||
</fieldset><br />
|
||||
{* Category info *}
|
||||
{if (isset($categoryData['info']) && $categoryData['info'])}
|
||||
<p>{$categoryData['info']}</p>
|
||||
{/if}
|
||||
|
||||
{if !$categoryData['hide_multishop_checkbox'] && $use_multishop}
|
||||
<input type="checkbox" style="vertical-align: text-top" onclick="checkAllMultishopDefaultValue(this)" /> <b>{l s='Check/uncheck all'}</b> {l s='(Check boxes if you want to set a custom value for this shop or group shop context)'}
|
||||
<div class="separation"></div>
|
||||
{/if}
|
||||
|
||||
{foreach $categoryData['fields'] AS $key => $field}
|
||||
{if $field['type'] == 'hidden'}
|
||||
<input type="hidden" name="{$key}" value="{$field['value']}" />
|
||||
{else}
|
||||
<div class="row">
|
||||
<div id="conf_id_{$key}" {if $field['is_invisible']} class="isInvisible"{/if}>
|
||||
{if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
|
||||
<div class="preference_default_multishop col-lg-6">
|
||||
<input type="checkbox" name="multishopOverrideOption[{$key}]" value="1" {if !$field['is_disabled']}checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
|
||||
</div>
|
||||
{/if}
|
||||
{block name="label"}
|
||||
{if isset($field['title']) && isset($field['desc'])}
|
||||
<label class="control-label col-lg-3">
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{$field['desc']}">
|
||||
{$field['title']}
|
||||
</span>
|
||||
</label>
|
||||
{else}
|
||||
<label class="control-label col-lg-3">{$field['title']}</label>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="field"}
|
||||
|
||||
{block name="input"}
|
||||
{if $field['type'] == 'select'}
|
||||
<div class="col-lg-6">
|
||||
{if $field['list']}
|
||||
<select name="{$key}"{if isset($field['js'])} onchange="{$field['js']}"{/if} id="{$key}" {if isset($field['size'])} size="{$field['size']}"{/if}>
|
||||
{foreach $field['list'] AS $k => $option}
|
||||
<option value="{$option[$field['identifier']]}"{if $field['value'] == $option[$field['identifier']]} selected="selected"{/if}>{$option['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else if isset($input.empty_message)}
|
||||
{$input.empty_message}
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $field['type'] == 'bool'}
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="switch prestashop-switch">
|
||||
<input type="radio" name="{$key}" id="{$key}_on" value="1" {if $field['value']} checked="checked"{/if}{if isset($field['js']['on'])} {$field['js']['on']}{/if}/>
|
||||
<label for="{$key}_on" class="radioCheck">
|
||||
<i class="icon-check-sign"></i> {l s='Yes'}
|
||||
</label>
|
||||
<input type="radio" name="{$key}" id="{$key}_off" value="0" {if !$field['value']} checked="checked"{/if}{if isset($field['js']['off'])} {$field['js']['off']}{/if}/>
|
||||
<label for="{$key}_off" class="radioCheck">
|
||||
<i class="icon-ban-circle"></i> {l s='No'}
|
||||
</label>
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{elseif $field['type'] == 'radio'}
|
||||
{foreach $field['choices'] AS $k => $v}
|
||||
<div class="col-lg-6">
|
||||
<p class="radio">
|
||||
<input type="radio" name="{$key}" id="{$key}_{$k}" value="{$k}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
|
||||
<label class="col-lg-3" for="{$key}_{$k}"> {$v}</label>
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif $field['type'] == 'checkbox'}
|
||||
{foreach $field['choices'] AS $k => $v}
|
||||
<div class="col-lg-6">
|
||||
<p class="checkbox">
|
||||
<input type="checkbox" name="{$key}" id="{$key}{$k}_on" value="{$k|intval}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
|
||||
<label class="col-lg-3" for="{$key}{$k}_on"> {$v}</label>
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif $field['type'] == 'text'}
|
||||
<div class="col-lg-6">
|
||||
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
|
||||
{if isset($field['suffix'])} {$field['suffix']|strval}{/if}
|
||||
</div>
|
||||
{elseif $field['type'] == 'password'}
|
||||
<div class="col-lg-6">
|
||||
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if} />
|
||||
{if isset($field['suffix'])} {$field['suffix']|strval}{/if}
|
||||
</div>
|
||||
{elseif $field['type'] == 'textarea'}
|
||||
<div class="col-lg-6">
|
||||
<textarea name={$key} cols="{$field['cols']}" rows="{$field['rows']}">{$field['value']|escape:'htmlall':'UTF-8'}</textarea>
|
||||
</div>
|
||||
{elseif $field['type'] == 'file'}
|
||||
{if isset($field['thumb']) && $field['thumb']}
|
||||
<div class="col-lg-6">
|
||||
<img src="{$field['thumb']}" alt="{$field['title']}" title="{$field['title']}" />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-lg-6">
|
||||
<input type="file" name="{$key}" />
|
||||
</div>
|
||||
{elseif $field['type'] == 'color'}
|
||||
<div class="col-lg-6">
|
||||
<input type="color" size="{$field['size']}" data-hex="true" {if isset($input.class)}class="{$field['class']}" {else}class="color mColorPickerInput"{/if} name="{$field['name']}" class="{if isset($field['class'])}{$field['class']}{/if}" value="{$field['value']|escape:'htmlall':'UTF-8'}" />
|
||||
</div>
|
||||
{elseif $field['type'] == 'price'}
|
||||
<div class="col-lg-6">
|
||||
{$currency_left_sign}<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" />{$currency_right_sign} {l s='(tax excl.)'}
|
||||
</div>
|
||||
{elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang' || $field['type'] == 'selectLang'}
|
||||
{if $field['type'] == 'textLang'}
|
||||
{foreach $field['languages'] AS $id_lang => $value}
|
||||
<div id="{$key}_{$id_lang}" style="display: {if $id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-1">
|
||||
<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}_{$id_lang}" value="{$value|escape:'htmlall':'UTF-8'}" />
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif $field['type'] == 'textareaLang'}
|
||||
{foreach $field['languages'] AS $id_lang => $value}
|
||||
<div id="{$key}_{$id_lang}" style="display: {if $id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-6">
|
||||
<textarea rows="{$field['rows']}" cols="{$field['cols']|intval}" name="{$key}_{$id_lang}">{$value|replace:'\r\n':"\n"}</textarea>
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif $field['type'] == 'selectLang'}
|
||||
{foreach $languages as $language}
|
||||
<div id="{$key}_{$language.id_lang}" style="display: {if $language.id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-6">
|
||||
<select name="{$key}_{$language.iso_code|upper}">
|
||||
{foreach $field['list'] AS $k => $v}
|
||||
<option value="{if isset($v.cast)}{$v.cast[$v[$field.identifier]]}{else}{$v[$field.identifier]}{/if}"
|
||||
{if $field['value'][$language.id_lang] == $v['name']} selected="selected"{/if}>
|
||||
{$v['name']}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
{/foreach}
|
||||
{/if}
|
||||
{if count($languages) > 1}
|
||||
{* TO DO - ajouter les langues*}
|
||||
<div class="displayed_flag">
|
||||
<img src="../img/l/{$current_id_lang}.jpg" class="pointer" id="language_current_{$key}" onclick="toggleLanguageFlags(this);" />
|
||||
</div>
|
||||
<div id="languages_{$key}" class="language_flags">
|
||||
{l s='Choose language:'}<br /><br />
|
||||
{foreach $languages as $language}
|
||||
<img src="../img/l/{$language.id_lang}.jpg" class="pointer" alt="{$language.name}" title="{$language.name}" onclick="changeLanguage('{$key}', '{if isset($custom_key)}{$custom_key}{else}{$key}{/if}', {$language.id_lang}, '{$language.iso_code}');" />
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if isset($field['required']) && $field['required'] && $field['type'] != 'radio'}
|
||||
<sup>*</sup>
|
||||
{/if}
|
||||
{if isset($field['hint'])}<span class="alert alert-info" name="help_box">{$field['hint']}<span class="hint-pointer"> </span></span>{/if}
|
||||
{/block}{* end block input *}
|
||||
{if $field['is_invisible']}
|
||||
<p class="alert alert-block">
|
||||
{l s='You can\'t change the value of this configuration field in the context of this shop.'}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/block}{* end block field *}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if isset($categoryData['submit'])}
|
||||
<div class="col-lg-12 text-right">
|
||||
<input type="submit" value="{if isset($categoryData['submit']['title'])}{$categoryData['submit']['title']}{else}{l s='Save'}{/if}" name="{if isset($categoryData['submit']['name'])}{$categoryData['submit']['name']}{else}submitOptions{$table}{/if}" class="{if isset($categoryData['submit']['class'])}{$categoryData['submit']['class']}{else}btn btn-default{/if}" id="{$table}_form_submit_btn"
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($categoryData['required_fields']) && $categoryData['required_fields']}
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
{/if}
|
||||
{if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if}
|
||||
</fieldset>
|
||||
{/foreach}
|
||||
{hook h='displayAdminOptions'}
|
||||
{if isset($name_controller)}
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminDeliverySlipControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'delivery';
|
||||
|
||||
$this->context = Context::getContext();
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminOrderMessageControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'order_message';
|
||||
$this->className = 'OrderMessage';
|
||||
$this->lang = true;
|
||||
|
||||
@@ -29,6 +29,7 @@ class AdminPreferencesControllerCore extends AdminController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->className = 'Configuration';
|
||||
$this->table = 'configuration';
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminReturnControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->table = 'order_return';
|
||||
$this->className = 'OrderReturn';
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminSlipControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'order_slip';
|
||||
$this->className = 'OrderSlip';
|
||||
$this->fields_list = array(
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminStatusesControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'order_state';
|
||||
$this->className = 'OrderState';
|
||||
$this->lang = true;
|
||||
|
||||
Reference in New Issue
Block a user