This commit is contained in:
jf-cbd
2025-11-04 17:02:56 +01:00
parent a092b65be7
commit 4f4ba7167d
4 changed files with 34 additions and 13 deletions

View File

@@ -48,11 +48,12 @@
{%- block form_rows -%}
{% for block in blocks %}
<div id="block_{{ block.identifier }}" class="ibo-field ibo-content-block ibo-block ibo-field-small">
{{ block.name }} {{ block.added }}
{% if block.added == 1 %}
{{ form_row(form[block.name]) }}
{% endif %}
<div id="block_{{ block.id }}" class="ibo-field ibo-content-block ibo-block ibo-field-small">
{% if block.added == 1 %}
{{ form_row(form[block.name]) }}
{% else %}
<div style="background-color: #ecd9eb;border-radius: 6px;padding: 2px 5px;">Reserved place for <b>{{ block.name }}</b></div>
{% endif %}
</div>
{% endfor %}
@@ -65,7 +66,7 @@
{{- block('form_widget') -}}
{% if allow_add %}
<div style="margin-top: 20px;">
<button type="button" class="add_item_link ibo-button ibo-button ibo-is-regular " data-collection-holder-class="{{ name }}">{{ button_label|dict_s }}</button>
<button type="button" class="add_item_link ibo-button ibo-button ibo-is-regular " data-collection-holder-class="{{ name }}">{{ button_label|dict_s }}</button>
</div>
{% endif %}
{%- endblock collection_widget -%}

View File

@@ -1,10 +1,10 @@
{# @copyright Copyright (C) 2010-2025 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% for sId in form_diff %}
{% if form.(sId) %}
{% UITurboUpdate Standard { sTarget: "block_" ~ sId} %}
{{ form_row(form.(sId)) }}
{% EndUITurboUpdate %}
{% for sBlockIdentifier, oBlockToRedraw in blocks_to_redraw %}
{% UITurboUpdate Standard { sTarget: "block_" ~ sBlockIdentifier} %}
{% if oBlockToRedraw is not null %}
{{ form_row(oBlockToRedraw) }}
{% endif %}
{% EndUITurboUpdate %}
{% endfor %}