Add a blue dot to the collection type delete buttons in forms to indicate that this element was not yet saved to DB yet

This commit is contained in:
Jan Böhmer 2023-11-20 21:47:34 +01:00
parent 87626589a3
commit c5435df6f9
4 changed files with 36 additions and 7 deletions

View file

@ -29,4 +29,13 @@
{% macro delete_btn() %}
{{ stimulus_action('elements/collection_type', 'deleteElement') }}
{% endmacro %}
{% macro new_element_indicator(value) %}
{% if value.id is not defined or value.id is null %}
<span class="position-absolute top-0 start-100 translate-middle p-2 bg-primary border border-light rounded-circle"
title="{% trans %}collection_type.new_element.tooltip{% endtrans %}">
<span class="visually-hidden">New alerts</span>
</span>
{% endif %}
{% endmacro %}