This commit is contained in:
2025-07-03 20:56:08 +02:00
parent c5c208aa43
commit cc0c9e86b8
190 changed files with 21992 additions and 61 deletions

View File

@@ -0,0 +1,58 @@
{*
* 2020 Anvanto
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author Anvanto (anvantoco@gmail.com)
* @copyright 2020 anvanto.com
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="helpers/form/form.tpl"}
{block name="input"}
{if $input.type == 'number'}
<input type="number"
id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"
name="{$input.name}"
class="form-control {if isset($input.class)} {$input.class} {/if}"
onkeyup="return (function (el, e) {
if (e.keyCode == 8) return true;
jQuery(el).val((parseInt(jQuery(el).val()) || 1));
if (jQuery(el).val() < (parseInt(jQuery(el).attr('min')) || 1)) {
jQuery(el).val((parseInt(jQuery(el).attr('min')) || 1));
} else if (jQuery(el).val() > (parseInt(jQuery(el).attr('max')) || 99999)) {
jQuery(el).val((parseInt(jQuery(el).attr('max')) || 99999));
}
})(this, event);"
value="{$fields_value[$input.name]|escape:'html':'UTF-8'}"
{if isset($input.size)} size="{$input.size}"{/if}
{if isset($input.maxchar) && $input.maxchar} data-maxchar="{$input.maxchar|intval}"{/if}
{if isset($input.maxlength) && $input.maxlength} maxlength="{$input.maxlength|intval}"{/if}
{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if}
{if isset($input.disabled) && $input.disabled} disabled="disabled"{/if}
{if isset($input.autocomplete) && !$input.autocomplete} autocomplete="off"{/if}
{if isset($input.required) && $input.required} required="required" {/if}
{if isset($input.max)} max="{$input.max|intval}"{/if}
{if isset($input.min)} min="{$input.min|intval}"{/if}
{if isset($input.placeholder) && $input.placeholder} placeholder="{$input.placeholder}"{/if} />
{else}
{$smarty.block.parent}
{/if}
{/block}

View File

@@ -0,0 +1,73 @@
{*
* 2023 Anvanto
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
*
* @author Anvanto <anvantoco@gmail.com>
* @copyright 2023 Anvanto
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*}
{extends file="helpers/form/form.tpl"}
{block name="input"}
{if $input.type == 'anSearchProductsList'}
<div class="col-lg-12">
<div id="{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'html':'UTF-8'}{/if}"
class="anblog_search_products{if isset($input.class)} {$input.class|escape:'html':'UTF-8'}{/if} {* fixed-width-xl *}"
data-searchProdutsController="{if isset($input.searchProdutsController)}{$input.searchProdutsController|escape:'html':'UTF-8'}{/if}"
data-classProductLine="js-anblog_search-line anblog_search_products-line{if isset($input.classProductLine)} {$input.classProductLine|escape:'html':'UTF-8'}{/if}"
data-classProductRemove="js-anblog_search_products-remove {if isset($input.classProductRemove)}{$input.classProductRemove|escape:'html':'UTF-8'}{/if}"
data-inputName="{$input.name|escape:'html':'UTF-8'}"
data-classSarchInput="{if isset($input.classSarchInput)}{$input.classSarchInput|escape:'html':'UTF-8'}{/if}"
>
{foreach from=$fields_value[$input.name] item=item name=fo}
<div class="js-anblog_search-line anblog_search_products-line {if isset($input.classProductLine)}{$input.classProductLine|escape:'html':'UTF-8'}{/if}">
<input type="hidden" name="{$input.name|escape:'html':'UTF-8'}" value="{$item.id_product|escape:'htmlall':'UTF-8'}" />{* <img src="'+img+'" />*}
<div class="label">{$item.name|escape:'htmlall':'UTF-8'} (ref: {$item.reference|escape:'htmlall':'UTF-8'}) <i class="material-icons delete js-anblog_search_products-remove {if isset($input.classProductRemove)}{$input.classProductRemove|escape:'html':'UTF-8'}{/if}">delete</i></div>
</div>
{/foreach}
</div>
</div>
{elseif $input.type == 'number'}
<input type="number"
id="{if isset($input.id)}{$input.id|escape:'html':'UTF-8'}{else}{$input.name|escape:'htmlall':'UTF-8'}{/if}"
name="{$input.name|escape:'htmlall':'UTF-8'}"
class="form-control {if isset($input.class)} {$input.class|escape:'htmlall':'UTF-8'} {/if}"
onkeyup="return (function (el, e) {
if (e.keyCode == 8) return true;
jQuery(el).val((parseInt(jQuery(el).val()) || 0));
if (jQuery(el).val() < (parseInt(jQuery(el).attr('min')) || 0)) {
jQuery(el).val((parseInt(jQuery(el).attr('min')) || 0));
} else if (jQuery(el).val() > (parseInt(jQuery(el).attr('max')) || 0)) {
jQuery(el).val((parseInt(jQuery(el).attr('max')) || 0));
}
})(this, event);"
value="{$fields_value[$input.name]|escape:'html':'UTF-8'}"
{if isset($input.size)} size="{$input.size|escape:'htmlall':'UTF-8'}"{/if}
{if isset($input.maxchar) && $input.maxchar} data-maxchar="{$input.maxchar|intval}"{/if}
{if isset($input.maxlength) && $input.maxlength} maxlength="{$input.maxlength|intval}"{/if}
{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if}
{if isset($input.disabled) && $input.disabled} disabled="disabled"{/if}
{if isset($input.autocomplete) && !$input.autocomplete} autocomplete="off"{/if}
{if isset($input.required) && $input.required} required="required" {/if}
{if isset($input.max)} max="{$input.max|intval}"{/if}
{if isset($input.min)} min="{$input.min|intval}"{/if}
{if isset($input.placeholder) && $input.placeholder} placeholder="{$input.placeholder|escape:'htmlall':'UTF-8'}"{/if} />
{elseif $input.type == 'html'}
{if isset($input.html_content)}
{if $input.html_content == 'hr'}
<hr />
{else}
{$input.html_content|escape:'htmlall':'UTF-8'}
{/if}
{else}
{$input.name|escape:'htmlall':'UTF-8'}
{/if}
{else}
{$smarty.block.parent}
{/if}
{/block}