From 631ea82186d2093a77ac9d76129c742cddc72518 Mon Sep 17 00:00:00 2001 From: stanislavh Date: Tue, 5 Dec 2023 11:07:07 +0100 Subject: [PATCH] SONAR-21132 Do not show CCT fields in edit dialog Co-authored-by: Benjamin Raymond <31401273+7PH@users.noreply.github.com> --- .../components/CustomRuleFormModal.tsx | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx index de13a247820..dce99ab2ba7 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx @@ -307,26 +307,30 @@ export default function CustomRuleFormModal(props: Readonly) { {NameField} {KeyField} - -
- - -
- + {/* do not allow to change CCT fields of existing rule */} + {!customRule && !reactivating && ( + <> +
+ + +
+ + + )} {StatusField} {DescriptionField} {templateParams.map(renderParameterField)} -- 2.39.5