From aa607f201ef505f24420e883633e7fa553776190 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 27 Feb 2025 18:35:48 +0100 Subject: [PATCH] Added indicator when loading EZ in ConstructionConsent/Form --- Layout/default/ConstructionConsent/Form.php | 19 +++++++++++-------- scripts/import/.gitignore | 2 ++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Layout/default/ConstructionConsent/Form.php b/Layout/default/ConstructionConsent/Form.php index 5a888459f..9557c6c3d 100644 --- a/Layout/default/ConstructionConsent/Form.php +++ b/Layout/default/ConstructionConsent/Form.php @@ -404,14 +404,17 @@ $("#gstnr").val(kg + gst); // update EZ - - var response = await fetch(' "getEz"])?>&kg=' + kg + '&gst=' + gst); - if (!response.ok) { - return false; - } - var resp_json = await response.json(); - if(resp_json.status == "OK" && resp_json.result.ez) { - $("#ez").val(resp_json.result.ez); + if($("#object_type").val() == "building") { + $("#ez").prop("readonly", true); + var response = await fetch(' "getEz"])?>&kg=' + kg + '&gst=' + gst); + if (!response.ok) { + return false; + } + var resp_json = await response.json(); + if (resp_json.status == "OK" && resp_json.result.ez) { + $("#ez").val(resp_json.result.ez); + } + $("#ez").prop("readonly", false); } } diff --git a/scripts/import/.gitignore b/scripts/import/.gitignore index 3eb7507cd..c16953f1e 100644 --- a/scripts/import/.gitignore +++ b/scripts/import/.gitignore @@ -2,3 +2,5 @@ !.gitignore !100mraster !100mraster/* +!gst +!gst/**