change turbo for form errors

This commit is contained in:
Benjamin Dalsass
2025-11-26 10:35:26 +01:00
parent 852238a110
commit 87ca11b771
19 changed files with 147 additions and 109 deletions

View File

@@ -108,7 +108,7 @@
{%- endblock form_row -%}
{%- block form_errors -%}
<div class="form-error">
<div id="turbo_error_{{ form.vars.id }}" class="form-error">
{{- parent() -}}
</div>
{%- endblock form_errors -%}

View File

@@ -1,15 +1,13 @@
{# @copyright Copyright (C) 2010-2025 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<turbo-stream action="update" target="turbo_itop_profiler">
<template>
{% if aProfilesInfo is not empty %}
{% UIPanel Neutral { sTitle:'Debug' } %}
{% for aProfileInfo in aProfilesInfo %}
{% set aProfileData = aProfileInfo.aProfileData %}
{{ include(aProfileInfo.sTemplate) }}
{% endfor %}
{% EndUIPanel %}
{% endif %}
</template>
</turbo-stream>
{% UITurboStream Update { sTarget: "turbo_itop_profiler"} %}
{% if aProfilesInfo is not empty %}
{% UIPanel Neutral { sTitle:'Debug' } %}
{% for aProfileInfo in aProfilesInfo %}
{% set aProfileData = aProfileInfo.aProfileData %}
{{ include(aProfileInfo.sTemplate) }}
{% endfor %}
{% EndUIPanel %}
{% endif %}
{% EndUITurboStream %}

View File

@@ -1,8 +1,8 @@
{# @copyright Copyright (C) 2010-2025 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% UITurboUpdate Standard { sTarget: "turbo_itop_error"} %}
{% UITurboStream Update { sTarget: "turbo_itop_error"} %}
{% if sControllerError %}
{% UIAlert ForDanger { sTitle:'', sContent:sControllerError } %}{% EndUIAlert %}
{% endif %}
{% EndUITurboUpdate %}
{% EndUITurboStream %}

View File

@@ -2,11 +2,14 @@
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% for sBlockIdentifier, oBlockToRedraw in blocks_to_redraw %}
{% UITurboUpdate Standard { sTarget: "turbo_" ~ sBlockIdentifier} %}
{% UITurboStream Update { sTarget: "turbo_" ~ sBlockIdentifier} %}
{% if oBlockToRedraw is not null %}
{{ form_row(oBlockToRedraw) }}
{# {% else %}#}
{# <div style="background-color: #ecd9eb;border-radius: 6px;padding: 2px 5px;">Reserved place for <b>{{ sBlockIdentifier }}</b></div>#}
{% endif %}
{% EndUITurboUpdate %}
{% endfor %}
{% EndUITurboStream %}
{% endfor %}
{% if current_block %}
{% UITurboStream Replace { sTarget: "turbo_error_" ~ current_block.vars.id} %}
{{ form_errors(current_block) }}
{% EndUITurboStream %}
{% endif %}