Files
iTop/templates/application/forms/itop_console_layout.html.twig
Benjamin Dalsass 0dae7346d1 N°8772 - Form dependencies manager implementation
- turbo implementation
2025-10-20 15:16:44 +02:00

31 lines
1.1 KiB
Twig

{% use "application/forms/itop_base_layout.html.twig" %}
{# Widgets #}
{%- block widget_attributes -%}
{% if type == 'text' %}{% set ibo_class='ibo-input-string' %}{% else %}{% set ibo_class='ibo-input-' ~ type %}{% endif %}
{% set attr = attr|merge({class: (attr.class|default('') ~ ' ibo-input ' ~ ibo_class)|trim}) %}
{{- parent() -}}
onChange="this.form.requestSubmit();"
{%- endblock widget_attributes -%}
{%- block form_label -%}
{%- if compound is defined and compound -%}
{%- set element = 'legend' -%}
{%- else -%}
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ibo-field--label')|trim}) %}
{%- endif -%}
{{- parent() -}}
{%- endblock form_label -%}
{%- block form_row -%}
{% set row_attr = row_attr|merge({class: (row_attr.class|default('') ~ ' ibo-field ibo-content-block ibo-block ibo-field-small')|trim}) %}
{{- parent() -}}
{%- endblock form_row -%}
{%- block form_errors -%}
<div class="form-error">
{{- parent() -}}
</div>
{%- endblock form_errors -%}