feat: improved handling of fields to be rendered as static text

This commit is contained in:
Björn Fromme
2026-03-16 11:59:11 +01:00
parent 5d69e4a8aa
commit ff39bf365c
8 changed files with 211 additions and 82 deletions
+8
View File
@@ -1,5 +1,13 @@
{% use 'form_div_layout.html.twig' %}
{# Macro to render a static (read-only) field value with consistent formatting #}
{% macro render_static_field(label, value) %}
<div class="mb-1">
<label class="font-semibold block">{{ label }}</label>
<div class="text-sm text-gray-600">{{ value ?: '-' }}</div>
</div>
{% endmacro %}
{# Macro to render info icon tooltip for descriptions #}
{% macro info_tooltip(description) %}
<div class="pt-px pl-1" {{ stimulus_controller('tooltip') }}>