{{ form_start(form) }} {% do form.data.setRendered %}

{{ 'title.infos'|trans }}

{{ form_row(form.file) }}
{{ form_row(form.name, {'label' : 'label.name', 'suggestions': suggestedNames|default }) }}
{{ form_row(form.collection, {'label' : 'label.collection'}) }}
{{ form_row(form.quantity, {'label' : 'label.quantity'} ) }}
{{ form_row(form.visibility, {'label' : 'label.visibility'} ) }}
{% if isFeatureEnabled('tags') %}
{{ form_label(form.tags, 'label.tags') }}
{{ form_widget(form.tags, {'label' : 'label.tags', 'attr': {'class' : 'hidden js-autocomplete-form-input'}}) }}
{% endif %}

{{ 'title.additional_fields'|trans }}

{% if isFeatureEnabled('templates') %} {{ form_row(form.template, {'label' : 'label.apply_template', 'attr' : {'class' : 'selectTemplate'}}) }} {% endif %}
{{ include('App/Item/_form_data_block.html.twig', {data: item.data}) }}

{{ 'title.related_items'|trans }}

{{ form_label(form.relatedItems, 'label.related_items') }}
{{ form_widget(form.relatedItems, {'label' : 'label.tags', 'attr': {'autocomplete': 'off', 'class' : 'hidden js-autocomplete-form-input'}}) }}
{% if app.request.get('_route') == 'app_item_add' %} {% set cancelUrl = path('app_collection_show', {id: app.request.query.get('collection')}) %} {% elseif app.request.get('_route') == 'app_wish_transfer_to_collection' %} {% set cancelUrl = path('app_wishlist_show', {id: wish.wishlist.id}) %} {% else %} {% set cancelUrl = path('app_collection_show', {id: item.collection.id}) %} {% endif %} {% if app.request.get('_route') == 'app_item_add' %} {% endif %} {{ 'btn.cancel'|trans }}
{{ form_end(form) }}