Use stimulus collection controller for partLots

This commit is contained in:
Jan Böhmer 2022-08-01 23:01:04 +02:00
parent 537b7fad7f
commit 66b7b2e9bf
6 changed files with 41 additions and 59 deletions

View file

@ -80,4 +80,22 @@
{{ form_errors(form) }}
</td>
</tr>
{% endblock %}
{% block part_lot_widget %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<tr>
<td>
{{ form_widget(form) }}
</td>
<td>
{% dump(form) %}
<button type="button" class="btn btn-danger lot_btn_delete" {{ collection.delete_btn() }}
{% if not is_granted('lots.delete', form.parent.parent.vars.data) %}disabled{% endif %}>
<i class="fas fa-trash-alt fa-fw"></i>
{% trans %}part_lot.delete{% endtrans %}
</button>
{{ form_errors(form) }}
</td>
</tr>
{% endblock %}