Initial commit

This commit is contained in:
2020-10-07 10:37:15 +02:00
commit ce5f440392
28157 changed files with 4429172 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,141 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @Product/CatalogPage/Forms/form_products.html.twig */
class __TwigTemplate_bdf1dfd26e2f6bd33aa6926e3648384bc1e6cf9b6df7b3125695af48f17a0b18 extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'product_catalog_form_table' => [$this, 'block_product_catalog_form_table'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 25
echo "<form
name=\"product_catalog_list\"
id=\"product_catalog_list\"
method=\"post\"
action=\"";
// line 29
echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath("admin_product_catalog", ["limit" => ($context["limit"] ?? null), "orderBy" => ($context["orderBy"] ?? null), "sortOrder" => ($context["sortOrder"] ?? null)]), "html", null, true);
echo "\"
orderingurl=\"";
// line 30
echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath("admin_product_catalog", ["offset" => 0, "limit" => 300, "orderBy" => "position_ordering", "sortOrder" => ($context["sortOrder"] ?? null)]), "html", null, true);
echo "\"
newproducturl=\"";
// line 31
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath("admin_product_new");
echo "\"
>
<div class=\"row\">
<div class=\"col-md-12\">
<input type=\"hidden\" name=\"filter_category\" value=\"";
// line 35
echo twig_escape_filter($this->env, (((isset($context["filter_category"]) || array_key_exists("filter_category", $context))) ? (_twig_default_filter(($context["filter_category"] ?? null), "")) : ("")), "html", null, true);
echo "\" />
</div>
</div>
<div class=\"row\">
<div class=\"col-md-12\">
";
// line 41
$this->displayBlock('product_catalog_form_table', $context, $blocks);
// line 62
echo " </div>
</div>
";
// line 65
if ((($context["product_count_filtered"] ?? null) > 20)) {
// line 66
echo " <div class=\"row\">
<div class=\"col-md-12\">
";
// line 68
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("PrestaShopBundle:Admin\\Common:pagination", ["limit" => // line 69
($context["limit"] ?? null), "offset" => ($context["offset"] ?? null), "total" => ($context["product_count_filtered"] ?? null), "caller_parameters" => ($context["pagination_parameters"] ?? null), "limit_choices" => ($context["pagination_limit_choices"] ?? null)]));
// line 70
echo "
</div>
</div>
";
}
// line 74
echo "</form>
";
}
// line 41
public function block_product_catalog_form_table($context, array $blocks = [])
{
// line 42
echo " ";
echo twig_include($this->env, $context, "@Product/CatalogPage/Lists/products_table.html.twig", ["limit" => // line 43
($context["limit"] ?? null), "orderBy" => // line 44
($context["orderBy"] ?? null), "offset" => // line 45
($context["offset"] ?? null), "sortOrder" => // line 46
($context["sortOrder"] ?? null), "filter_category" => // line 47
($context["filter_category"] ?? null), "filter_column_id_product" => // line 48
($context["filter_column_id_product"] ?? null), "filter_column_name" => // line 49
($context["filter_column_name"] ?? null), "filter_column_reference" => // line 50
($context["filter_column_reference"] ?? null), "filter_column_name_category" => // line 51
($context["filter_column_name_category"] ?? null), "filter_column_price" => // line 52
($context["filter_column_price"] ?? null), "filter_column_sav_quantity" => // line 53
($context["filter_column_sav_quantity"] ?? null), "filter_column_active" => // line 54
($context["filter_column_active"] ?? null), "has_category_filter" => // line 55
($context["has_category_filter"] ?? null), "activate_drag_and_drop" => // line 56
($context["activate_drag_and_drop"] ?? null), "products" => // line 57
($context["products"] ?? null), "last_sql" => // line 58
($context["last_sql"] ?? null)]);
// line 60
echo "
";
}
public function getTemplateName()
{
return "@Product/CatalogPage/Forms/form_products.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 110 => 60, 108 => 58, 107 => 57, 106 => 56, 105 => 55, 104 => 54, 103 => 53, 102 => 52, 101 => 51, 100 => 50, 99 => 49, 98 => 48, 97 => 47, 96 => 46, 95 => 45, 94 => 44, 93 => 43, 91 => 42, 88 => 41, 83 => 74, 77 => 70, 75 => 69, 74 => 68, 70 => 66, 68 => 65, 63 => 62, 61 => 41, 52 => 35, 45 => 31, 41 => 30, 37 => 29, 31 => 25,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "@Product/CatalogPage/Forms/form_products.html.twig", "/Volumes/Dev/Sources/Clients/taome/Nouveau_site/www/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Forms/form_products.html.twig");
}
}

View File

@@ -0,0 +1,639 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @PrestaShop/Admin/TwigTemplateForm/typeahead.html.twig */
class __TwigTemplate_303274cc0fa174429f7c9b12f79fac2494383722da266bd9cce06e7af7ca22c5 extends \Twig\Template
{
public function __construct(Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = [
'typeahead_product_collection_widget' => [$this, 'block_typeahead_product_collection_widget'],
'typeahead_product_pack_collection_widget' => [$this, 'block_typeahead_product_pack_collection_widget'],
'typeahead_customer_collection_widget' => [$this, 'block_typeahead_customer_collection_widget'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 25
$this->displayBlock('typeahead_product_collection_widget', $context, $blocks);
// line 68
echo "
";
// line 69
$this->displayBlock('typeahead_product_pack_collection_widget', $context, $blocks);
// line 213
echo "
";
// line 214
$this->displayBlock('typeahead_customer_collection_widget', $context, $blocks);
}
// line 25
public function block_typeahead_product_collection_widget($context, array $blocks = [])
{
// line 26
echo " <div
class=\"autocomplete-search\"
data-formid=\"";
// line 28
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\"
data-fullname=\"";
// line 29
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "full_name", []), "html", null, true);
echo "\"
data-mappingvalue=\"";
// line 30
echo twig_escape_filter($this->env, ($context["mapping_value"] ?? null), "html", null, true);
echo "\"
data-mappingname=\"";
// line 31
echo twig_escape_filter($this->env, ($context["mapping_name"] ?? null), "html", null, true);
echo "\"
data-remoteurl=\"";
// line 32
echo ($context["remote_url"] ?? null);
echo "\"
data-limit=\"";
// line 33
echo twig_escape_filter($this->env, ($context["limit"] ?? null), "html", null, true);
echo "\"
>
";
// line 35
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'errors');
echo "
<div class=\"search search-with-icon\">
<input type=\"text\" id=\"";
// line 38
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\" class=\"form-control search typeahead ";
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\" placeholder=\"";
echo twig_escape_filter($this->env, ($context["placeholder"] ?? null), "html", null, true);
echo "\" autocomplete=\"off\">
</div>
<small class=\"form-text text-muted text-right typeahead-hint\">
</small>
<ul id=\"";
// line 42
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data\" class=\"typeahead-list nostyle col-sm-12 product-list\">
";
// line 43
if (((isset($context["collection"]) || array_key_exists("collection", $context)) && (twig_length_filter($this->env, ($context["collection"] ?? null)) > 0))) {
// line 44
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["collection"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 45
echo " <li class=\"media\">
<div class=\"media-left\">
<img class=\"media-object image\" src=\"";
// line 47
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "image", []), "html", null, true);
echo "\" />
</div>
<div class=\"media-body media-middle\">
";
// line 50
echo sprintf(($context["template_collection"] ?? null), $this->getAttribute($context["item"], "name", []));
echo "
</div>
<input type=\"hidden\" name=\"";
// line 52
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "full_name", []), "html", null, true);
echo "[data][]\" value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id", []), "html", null, true);
echo "\" />
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 55
echo " ";
}
// line 56
echo " </ul>
<div class=\"invisible\" id=\"tplcollection-";
// line 58
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\">
";
// line 59
echo ($context["template_collection"] ?? null);
echo "
</div>
</div>
<script type=\"text/javascript\">
\$('#";
// line 63
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "').on('focusout', function resetSearchBar() {
\$('#";
// line 64
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "').typeahead('val', '');
});
</script>
";
}
// line 69
public function block_typeahead_product_pack_collection_widget($context, array $blocks = [])
{
// line 70
echo " <h2 class=\"title-products ";
echo ((((isset($context["collection"]) || array_key_exists("collection", $context)) && (twig_length_filter($this->env, ($context["collection"] ?? null)) > 0))) ? ("") : ("hide"));
echo "\">";
echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("List of products for this pack", [], "Admin.Catalog.Feature"), "html", null, true);
echo "</h2>
<ul id=\"";
// line 71
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data\" class=\"typeahead-list pack nostyle row\">
";
// line 72
if (((isset($context["collection"]) || array_key_exists("collection", $context)) && (twig_length_filter($this->env, ($context["collection"] ?? null)) > 0))) {
// line 73
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["collection"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 74
echo " <li data-product=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id", []), "html", null, true);
echo "-";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id_product_attribute", []), "html", null, true);
echo "\" class=\"col-xl-3 col-lg-6 mb-1\">
<div class=\"pack-product\">
<img class=\"cover\" src=\"";
// line 76
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "image", []), "html", null, true);
echo "\" /> ";
echo sprintf(($context["template_collection"] ?? null), $this->getAttribute($context["item"], "name", []), $this->getAttribute($context["item"], "ref", []), $this->getAttribute($context["item"], "quantity", []));
echo "
<input type=\"hidden\" name=\"";
// line 77
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "full_name", []), "html", null, true);
echo "[data][]\" value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "quantity", []), "html", null, true);
echo "x";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id", []), "html", null, true);
echo "x";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id_product_attribute", []), "html", null, true);
echo "\" />
<input type=\"hidden\" name=\"";
// line 78
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "full_name", []), "html", null, true);
echo "[data][]\" value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "quantity", []), "html", null, true);
echo "x";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id", []), "html", null, true);
echo "x";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id_product_attribute", []), "html", null, true);
echo "\" />
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 82
echo " ";
}
// line 83
echo " </ul>
<h2>";
// line 85
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "label", []), "html", null, true);
echo "</h2>
<div class=\"row mb-2\">
<div class=\"col-md-6\">
<input type=\"text\" id=\"";
// line 89
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\" class=\"form-control typeahead search ";
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\" placeholder=\"";
echo twig_escape_filter($this->env, ($context["placeholder"] ?? null), "html", null, true);
echo "\" autocomplete=\"off\" />
</div>
<div class=\"col-md-3\">
<div class=\"input-group\">
<div class=\"input-group-prepend\">
<span class=\"input-group-text\">×</span>
</div>
<input type=\"number\" id=\"";
// line 96
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-curPackItemQty\" class=\"form-control curPackItemQty\" min=\"1\" value=\"1\">
</div>
</div>
<div class=\"col-md-3\">
<div class=\"input-group\">
<button id=\"";
// line 101
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-curPackItemAdd\" class=\"btn btn-secondary btn-block\">
<i class=\"material-icons\">add</i>
";
// line 103
echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Add", [], "Admin.Actions"), "html", null, true);
echo "
</button>
</div>
</div>
<div class=\"clearfix\"></div>
<script>
\$( document ).ready(function() {
//remove collection item
\$(document).on( 'click', '#";
// line 112
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data .delete', function(e) {
e.preventDefault();
var _this = \$(this);
modalConfirmation.create(translate_javascripts['Are you sure to delete this?'], null, {
onContinue: function(){
_this.closest('li').remove();
if(_this.parent().parent().length == 0){
\$('#js_";
// line 120
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo " h4.title-products').addClass('hide');
}
}
}).show();
});
\$('#";
// line 126
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-curPackItemAdd').click(function(e){
e.preventDefault();
if(\$(this).data('currentItem')){
var number = \$('#";
// line 129
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-curPackItemQty').val();
var data = \$(this).data('currentItem');
var value = number + 'x' + data.id + 'x' + (data.id_product_attribute ? data.id_product_attribute : 0);
var html = '<li data-product=\"' + data.id + '-' + (data.id_product_attribute ? data.id_product_attribute : 0) + '\" class=\"col-xl-3 col-lg-6 mb-1\">';
html += '<div class=\"pack-product\">';
html += '<img class=\"cover\" src=\"' + data.image +'\" />';
html += sprintf('";
// line 136
ob_start();
echo ($context["template_collection"] ?? null);
echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
echo "', data.";
echo twig_escape_filter($this->env, ($context["mapping_name"] ?? null), "html", null, true);
echo ", data.ref, number);
html += '<input type=\"hidden\" name=\"";
// line 137
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "full_name", []), "html", null, true);
echo "[data][]\" value=\"' + value + '\" />';
html += '</div>';
html += '</li>';
\$('#";
// line 141
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data').append(html);
\$('#js_";
// line 142
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo " h4.title-products').removeClass('hide');
\$('#";
// line 144
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "').val('');
}
\$(this).data('currentItem', null);
\$('#";
// line 148
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-curPackItemQty').val(1);
});
//define source
this['";
// line 152
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "_source'] = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace,
identify: function(obj) {
return obj.";
// line 156
echo twig_escape_filter($this->env, ($context["mapping_value"] ?? null), "html", null, true);
echo ";
},
remote: {
url: '";
// line 159
echo ($context["remote_url"] ?? null);
echo "',
cache: false,
wildcard: '%QUERY',
transform: function(response){
var newResponse = [];
if(!response){
return newResponse;
}
//generate excludes IDs and filter results
var excludeIds = [];
\$.each(\$('#";
// line 171
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data li'), function(key, val){
excludeIds.push(\$(val).attr('data-product'));
});
\$.each(response, function(key, item){
if(excludeIds.indexOf(item.id + '-' + item.id_product_attribute) === -1){
newResponse.push(item);
}
});
return newResponse;
}
}
});
//define typeahead
\$('#";
// line 187
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "').typeahead({
limit: 20,
minLength: 2,
highlight: true,
hint: false
}, {
display: '";
// line 193
echo twig_escape_filter($this->env, ($context["mapping_name"] ?? null), "html", null, true);
echo "',
source: this['";
// line 194
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "_source'],
limit: 30,
templates: {
suggestion: function(item){
return '<div>' +
'<table><tr>' +
'<td rowspan=\"2\"><img src=\"'+ item.image +'\" style=\"width:50px; margin-right: 7px;\" /></td>' +
'<td>' + item.name + '</td></tr>' +
'<tr><td>REF: ' + item.ref + '</td></tr>' +
'</table></div>'
}
}
}).bind('typeahead:select', function(ev, suggestion) {
\$('#";
// line 207
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-curPackItemAdd').data('currentItem', suggestion);
});
});
</script>
</div>
";
}
// line 214
public function block_typeahead_customer_collection_widget($context, array $blocks = [])
{
// line 215
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'errors');
echo "
<input type=\"text\" id=\"";
// line 216
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\" class=\"form-control typeahead ";
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "\" placeholder=\"";
echo twig_escape_filter($this->env, ($context["placeholder"] ?? null), "html", null, true);
echo "\" autocomplete=\"off\" />
<ul id=\"";
// line 217
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data\" class=\"typeahead-list product-list nostyle col-sm-12\">
";
// line 218
if (((isset($context["collection"]) || array_key_exists("collection", $context)) && (twig_length_filter($this->env, ($context["collection"] ?? null)) > 0))) {
// line 219
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["collection"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 220
echo " <li class=\"media\">
<div class=\"media-body\">
";
// line 222
echo sprintf(($context["template_collection"] ?? null), $this->getAttribute($context["item"], "name", []));
echo "
</div>
<input type=\"hidden\" name=\"";
// line 224
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "full_name", []), "html", null, true);
echo "[data][]\" value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id", []), "html", null, true);
echo "\" />
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 227
echo " ";
}
// line 228
echo " </ul>
<script>
\$( document ).ready(function() {
//remove collection item
\$(document).on( 'click', '#";
// line 232
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data .delete', function(e) {
e.preventDefault();
var _this = \$(this);
modalConfirmation.create(translate_javascripts['Are you sure to delete this?'], null, {
onContinue: function(){
_this.closest('li').remove();
_this.parent().parent().hide();
_this.parent().remove();
}
}).show();
});
//define source
this['";
// line 246
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "_source'] = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace,
identify: function(obj) {
return obj.";
// line 250
echo twig_escape_filter($this->env, ($context["mapping_value"] ?? null), "html", null, true);
echo ";
},
remote: {
url: '";
// line 253
echo ($context["remote_url"] ?? null);
echo "',
cache: false,
wildcard: '%QUERY',
transform: function(response){
if(!response){
return [];
}
return response;
}
}
});
//define typeahead
\$('#";
// line 266
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "').typeahead({
limit: 200,
minLength: 2,
highlight: true,
cache: false,
hint: false,
}, {
display: '";
// line 273
echo twig_escape_filter($this->env, ($context["mapping_name"] ?? null), "html", null, true);
echo "',
source: this['";
// line 274
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "_source'],
limit: 30,
templates: {
suggestion: function(item){
return '<div>'+ item.";
// line 278
echo twig_escape_filter($this->env, ($context["mapping_name"] ?? null), "html", null, true);
echo " +'</div>'
}
}
}).bind('typeahead:select', function(ev, suggestion) {
//if collection length is up to limit, return
if(";
// line 284
echo twig_escape_filter($this->env, ($context["limit"] ?? null), "html", null, true);
echo " != 0 && \$('#";
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data li').length >= ";
echo twig_escape_filter($this->env, ($context["limit"] ?? null), "html", null, true);
echo "){
return;
}
var value = suggestion.";
// line 288
echo twig_escape_filter($this->env, ($context["mapping_value"] ?? null), "html", null, true);
echo ";
if (suggestion.id_product_attribute) {
value = value+','+suggestion.id_product_attribute;
}
var html = '<li class=\"media\">';
html += sprintf('";
// line 294
ob_start();
echo ($context["template_collection"] ?? null);
echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
echo "', suggestion.";
echo twig_escape_filter($this->env, ($context["mapping_name"] ?? null), "html", null, true);
echo ");
html += '<input type=\"hidden\" name=\"";
// line 295
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "full_name", []), "html", null, true);
echo "[data][]\" value=\"' + value + '\" />';
html += '</li>';
\$('#";
// line 297
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data').show();
\$('#";
// line 298
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
echo "-data').append(html);
}).bind('typeahead:close', function(ev) {
\$(ev.target).val('');
});
});
</script>
";
}
public function getTemplateName()
{
return "@PrestaShop/Admin/TwigTemplateForm/typeahead.html.twig";
}
public function getDebugInfo()
{
return array ( 606 => 298, 602 => 297, 597 => 295, 589 => 294, 580 => 288, 569 => 284, 560 => 278, 553 => 274, 549 => 273, 539 => 266, 523 => 253, 517 => 250, 510 => 246, 493 => 232, 487 => 228, 484 => 227, 473 => 224, 468 => 222, 464 => 220, 459 => 219, 457 => 218, 453 => 217, 445 => 216, 440 => 215, 437 => 214, 427 => 207, 411 => 194, 407 => 193, 398 => 187, 379 => 171, 364 => 159, 358 => 156, 351 => 152, 344 => 148, 337 => 144, 332 => 142, 328 => 141, 321 => 137, 313 => 136, 303 => 129, 297 => 126, 288 => 120, 277 => 112, 265 => 103, 260 => 101, 252 => 96, 238 => 89, 231 => 85, 227 => 83, 224 => 82, 208 => 78, 198 => 77, 192 => 76, 184 => 74, 179 => 73, 177 => 72, 173 => 71, 166 => 70, 163 => 69, 155 => 64, 151 => 63, 144 => 59, 140 => 58, 136 => 56, 133 => 55, 122 => 52, 117 => 50, 111 => 47, 107 => 45, 102 => 44, 100 => 43, 96 => 42, 85 => 38, 79 => 35, 74 => 33, 70 => 32, 66 => 31, 62 => 30, 58 => 29, 54 => 28, 50 => 26, 47 => 25, 43 => 214, 40 => 213, 38 => 69, 35 => 68, 33 => 25,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Source("", "@PrestaShop/Admin/TwigTemplateForm/typeahead.html.twig", "/Volumes/Dev/Sources/Clients/taome/Nouveau_site/www/src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/typeahead.html.twig");
}
}

File diff suppressed because it is too large Load Diff