{% extends 'dashboard/base.html.twig' %} {% block title %} {% if item.id %} {{ 'dashboard.item_form.edit_title'|trans }} {% else %} {{ 'dashboard.item_form.create_title'|trans }} {% endif %} {% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block dashboard_content %}

{% if item.id %} {{ 'dashboard.item_form.edit_title'|trans }} {% else %} {{ 'dashboard.item_form.create_title'|trans }} {% endif %}

{{ 'dashboard.items.back_to_list'|trans }}

{% if item.id %} {{ 'dashboard.item_form.edit_title'|trans }} {% else %} {{ 'dashboard.item_form.create_title'|trans }} {% endif %}

{{ form_start(form, {'attr': {'id': 'itemForm', 'novalidate': 'novalidate'}}) }}
{{ form_row(form.title, {'attr': {'class': 'form-control form-control-lg'}}) }}
{{ form_row(form.price, {'attr': {'class': 'form-control form-control-lg'}}) }}
{{ form_row(form.category, {'attr': {'class': 'form-select form-select-lg'}}) }}
{{ form_row(form.status, {'attr': {'class': 'form-select form-select-lg'}}) }}
{{ form_row(form.description, {'attr': {'class': 'form-control', 'rows': '5'}}) }}
{{ 'dashboard.item_form.ajax.title'|trans }}
{{ 'dashboard.item_form.ajax.description'|trans }}
{{ 'dashboard.item_form.drag_drop_images'|trans }}

{{ 'dashboard.item_form.or_click_to_select'|trans }}

{{ 'dashboard.item_form.ajax.formats'|trans }}
{{ 'dashboard.item_form.ajax.max_size'|trans }}
{{ 'dashboard.item_form.ajax.concurrent'|trans }}

{{ form_widget(form.images, {'attr': {'class': 'hidden-input-field', 'id': 'imageInput'}}) }}
{{ 'dashboard.item_form.cancel'|trans }}
{{ form_end(form) }}
{{ 'dashboard.item_form.tips_title'|trans }}
{{ 'dashboard.item_form.features.title'|trans }}
  • {{ 'dashboard.item_form.features.simultaneous'|trans }}
  • {{ 'dashboard.item_form.features.progress'|trans }}
  • {{ 'dashboard.item_form.features.error_handling'|trans }}
  • {{ 'dashboard.item_form.features.cancel'|trans }}
  • {{ 'dashboard.item_form.features.reorder'|trans }}
{{ 'dashboard.item_form.tips.title'|trans }}
  • {{ 'dashboard.item_form.tips.description'|trans }}
  • {{ 'dashboard.item_form.tips.images'|trans }}
  • {{ 'dashboard.item_form.tips.price'|trans }}
  • {{ 'dashboard.item_form.tips.category'|trans }}
{% if item.id and item.images|length > 0 %}
{{ 'dashboard.item_form.current_images.title'|trans }} {{ item.images|length }}
{{ 'dashboard.item_form.current_images.reorder_info'|trans }}
{% for image in item.images %}
{{ item.title }} {% if loop.first %} {{ 'dashboard.item_form.current_images.primary_badge'|trans }} {% endif %}
{{ image.originalName|length > 20 ? image.originalName[:20] ~ '...' : image.originalName }}
{{ image.formattedFileSize }}
{% endfor %}
{% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}