{#** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * 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 https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) *#} {% block entity_search_input_widget %} {# We cannot use the escape filter for remote_url or it breaks the url and it is not callable any more #} {%- set attr = attr|merge({ 'data-prototype-template': form_row(prototype), 'data-prototype-index': prototype.vars.name|e('html_attr'), 'data-prototype-mapping': prototype_mapping|json_encode, 'data-identifier-field': identifier_field, 'data-filtered-identities': filtered_identities|json_encode, 'data-remove-modal': remove_modal|json_encode, 'data-remote-url': remote_url, 'data-data-limit': limit, 'data-min-length': min_length, 'data-allow-delete': form.vars.allow_delete ? 1 : 0, 'data-suggestion-field': form.vars.suggestion_field }) -%} {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' entity-search-widget')|trim }) -%} {# We use widget_container_attributes in this widget because we do not want the name property #}
{# If dynamic addition is disabled we don't display the search input field #} {% if form.vars.allow_search %} {% endif %} {{- block('form_help') -}} {%- set id = form.vars.id ~ '_list' -%} {% if list_layout == 'table' %} {{- block('entity_search_table_layout') -}} {% else %} {{- block('entity_search_list_layout') -}} {% endif %} {% if empty_state is not null %} {% endif %}
{% endblock %} {% block entity_search_list_layout %} {%- set attr = list_attr|merge({'class': (list_attr.class|default('') ~ ' entities-list entities-list-container')|trim }) -%} {% endblock %} {% block entity_search_table_layout %} {%- set attr = list_attr|merge({'class': (list_attr.class|default('') ~ ' entities-list-container')|trim }) -%}
{% for child in prototype.children %} {% set childType = child.vars.block_prefixes.1 %} {% if childType != 'hidden' %} {% endif %} {% endfor %} {# If item deletion is disabled we don't display the extra column for actions #} {% if form.vars.allow_delete %} {% endif %} {{- block('form_rows') -}}
{{ child.vars.label }}
{% endblock %} {% block entity_item_row %} {% if form.parent.vars.list_layout == 'table' %} {{- block('entity_item_table_row') -}} {% else %} {{- block('entity_item_list_row') -}} {% endif %} {% endblock %} {% block entity_item_list_row %} {% set attr = attr|merge({'class': (attr.class|default('') ~ ' media entity-item')|trim}) %}
  • {{ form_widget(form.image) }}
    {{ form_widget(form.name) }} clear
    {{ form_widget(form.id) }}
  • {% endblock %} {%- block entity_item_table_row -%} {% set attr = attr|merge({'class': (attr.class|default('') ~ ' entity-item')|trim}) %} {% for child in form.children %} {% set childType = child.vars.block_prefixes.1 %} {% if childType == 'hidden'%} {{ form_widget(child) }} {% else %} {{ form_widget(child) }} {% endif %} {% endfor %} {# If item deletion is disabled we don't display the extra column for actions #} {% if form.parent.vars.allow_delete %} clear {% endif %} {%- endblock -%}