diff --git a/templates/pages/backoffice/ajaxpage/layout.html.twig b/templates/pages/backoffice/ajaxpage/layout.html.twig
index 10b0fe027..00c9db517 100644
--- a/templates/pages/backoffice/ajaxpage/layout.html.twig
+++ b/templates/pages/backoffice/ajaxpage/layout.html.twig
@@ -1,6 +1,7 @@
{# @copyright Copyright (C) 2010-2023 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
+ {% set sId = oLayout.GetId() | sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) %}
{% if bEscapeContent %}
{{ render_block(oLayout, {aPage: aPage})|escape }}
{% else %}
@@ -16,33 +17,33 @@
{% endfor %}
{% endblock %}
- {% block iboPageJsInlineLive %}
- {% for sJsInline in aPage.aJsInlineLive %}
- {# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed multi-line comment) #}
-
- {% endfor %}
- {% for sJsInline in aPage.aJsInlineOnInit %}
-
- {% endfor %}
- {% endblock %}
+ {% block iboPageJsInlineLive %}
+ {% for sJsInline in aPage.aJsInlineLive %}
+ {# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed multi-line comment) #}
+
+ {% endfor %}
+ {% endblock %}
+
+
+
{% set sPromiseId = aPage.sPromiseId %}
{% if aPage.aJsFiles is not empty %}
- {% set sId = oLayout.GetId() | sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) %}
{% block iboPageJsFiles %}
{% endblock %}
{% else %}
{% block iboPageJsInlineOnDomReady %}
- {% for sJsInlineOnDomReady in aPage.aJsInlineOnDomReady %}
-
- {% endfor %}
+
{% endblock %}
{% endif %}