{% form_theme form with ['parts/edit/edit_form_styles.html.twig'] %}

{% import 'components/collection_type.macro.html.twig' as collection %}

<div {{ collection.controller(form.parameters, 'parameter.delete.confirm') }}>
    <table class="table table-striped table-sm table-bordered table-responsive-md" id="specifications_table" {{ collection.target() }}>
        <thead>
        <tr>
            <th>{% trans %}specifications.property{% endtrans %}</th>
            <th>{% trans %}specifications.symbol{% endtrans %}</th>
            <th>{% trans %}specifications.value_min{% endtrans %}</th>
            <th>{% trans %}specifications.value_typ{% endtrans %}</th>
            <th>{% trans %}specifications.value_max{% endtrans %}</th>
            <th>{% trans %}specifications.unit{% endtrans %}</th>
            <th>{% trans %}specifications.text{% endtrans %}</th>
            <th>{% trans %}specifications.group{% endtrans %}</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        {% for param in form.parameters %}
            {{ form_widget(param) }}
        {% endfor %}
        </tbody>
    </table>

    <button type="button" class="btn btn-success mb-2" {{ collection.create_btn() }} {% if not is_granted('edit', entity) %}disabled{% endif %}>
        <i class="fas fa-plus-square fa-fw"></i>
        {% trans %}specification.create{% endtrans %}
    </button>
</div>