From 773e2ac17edca521ef5d94e3149c29d22b101207 Mon Sep 17 00:00:00 2001 From: Adam Bem Date: Tue, 28 Feb 2023 15:04:08 +0100 Subject: [PATCH] Fixed bug with field staying red --- Frontend/assets/scripts/tools/scripts.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Frontend/assets/scripts/tools/scripts.js b/Frontend/assets/scripts/tools/scripts.js index 66e0d7f..76e82c8 100644 --- a/Frontend/assets/scripts/tools/scripts.js +++ b/Frontend/assets/scripts/tools/scripts.js @@ -29,6 +29,7 @@ function fillDefaultXML(element) { .then(response => response.text()) .then((exampleData) => { document.getElementById("xmlArea").value = exampleData; + document.getElementById("xmlArea").style.backgroundColor = null; }) } } @@ -161,6 +162,10 @@ function performFormatRequest(endpoint, checkXML, sourceId, targetId){ restRequest(port, endpoint, xmlData, "").then(function(result) { if (result.status == "OK") { document.getElementById(targetId).value = result.result; + document.getElementById(targetId).style.backgroundColor = null; + } + else { + document.getElementById(targetId).style.backgroundColor = color_red; } });