From f0ebf02f771470e7b07366b1487c570fd95bb12e Mon Sep 17 00:00:00 2001 From: Timothee Date: Fri, 22 Aug 2025 15:03:13 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B06759=20-=20Fix=20alerts=20html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itop-config/src/Controller/ConfigEditorController.php | 1 - datamodels/2.x/itop-config/templates/Edit.html.twig | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/datamodels/2.x/itop-config/src/Controller/ConfigEditorController.php b/datamodels/2.x/itop-config/src/Controller/ConfigEditorController.php index e2d37268e..771f1423b 100644 --- a/datamodels/2.x/itop-config/src/Controller/ConfigEditorController.php +++ b/datamodels/2.x/itop-config/src/Controller/ConfigEditorController.php @@ -69,7 +69,6 @@ class ConfigEditorController extends Controller throw new Exception(Dict::S('config-no-change'), iTopConfigValidator::CONFIG_INFO); } $oValidator = new iTopConfigValidator(); - $sNewConfig = str_replace("\r\n", "\n", $sNewConfig); $oValidator->Validate($sNewConfig);// throws exceptions diff --git a/datamodels/2.x/itop-config/templates/Edit.html.twig b/datamodels/2.x/itop-config/templates/Edit.html.twig index 5fedcd02a..2e8665b9d 100644 --- a/datamodels/2.x/itop-config/templates/Edit.html.twig +++ b/datamodels/2.x/itop-config/templates/Edit.html.twig @@ -1,14 +1,14 @@ {% for sError in aErrors %} - {% UIAlert ForDanger{sTitle: sError} %}{% EndUIAlert %} + {% UIAlert ForDanger{sContent: sError} %}{% EndUIAlert %} {% endfor %} {% for sWarning in aWarnings %} - {% UIAlert ForWarning{sTitle: sWarning} %}{% EndUIAlert %} + {% UIAlert ForWarning{sContent: sWarning} %}{% EndUIAlert %} {% endfor %} {% for sNotice in aNotices %} - {% UIAlert ForInformation{sTitle: sNotice} %}{% EndUIAlert %} + {% UIAlert ForInformation{sContent: sNotice} %}{% EndUIAlert %} {% endfor %} {% for sSuccess in aSuccesses %} - {% UIAlert ForSuccess{sTitle: sSuccess} %}{% EndUIAlert %} + {% UIAlert ForSuccess{sContent: sSuccess} %}{% EndUIAlert %} {% endfor %} {% UITitle ForPage {'sTitle':'config-edit-title'|dict_s} %}{% EndUITitle %}