diff --git a/src/Resources/translations/messages.en.php b/src/Resources/translations/messages.en.php index 96f6b46..f6de760 100644 --- a/src/Resources/translations/messages.en.php +++ b/src/Resources/translations/messages.en.php @@ -1,9 +1,6 @@ [ - 'empty' => 'Empty', - ], 'action' => [ 'add_new_item' => 'Add a new item', 'move_item_up' => 'Move item up', diff --git a/src/Resources/views/bootstrap_5_layout.html.twig b/src/Resources/views/bootstrap_5_layout.html.twig index 9e02f4c..0a61588 100644 --- a/src/Resources/views/bootstrap_5_layout.html.twig +++ b/src/Resources/views/bootstrap_5_layout.html.twig @@ -1,9 +1,3 @@ -{% block empty_collection %} -
- {{ 'label.empty'|trans }} -
-{% endblock empty_collection %} - {% block collection_js_row %} {% if prototype is defined and not prototype.rendered %} {% set row_attr = row_attr|merge({ 'data-prototype': form_row(prototype) }) %} @@ -24,18 +18,8 @@ {% endblock collection_js_row %} {% block collection_js_widget %} - {# the "is iterable" check is needed because if an object implements __toString() and - returns an empty string, "is empty" returns true even if it's not a collection #} - {% set isEmptyCollection = value is null or (value is iterable and value is empty) %} - -
- {% if isEmptyCollection %} - {{ block('empty_collection') }} - {% else %} -
- {{ block('form_widget') }} -
- {% endif %} +
+ {{ block('form_widget') }}
{% if allow_add|default(false) %} @@ -48,7 +32,7 @@ {% block collection_js_entry_widget %}
-

+

{{ value }}