From c86254972b635b9b552c2fe6a283e2487013ccb2 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 25 May 2023 11:18:00 +0200 Subject: [PATCH] remove fields when standard flow disabled (#20271) fixes: #20194 --- .../src/clients/add/LoginSettings.tsx | 86 ++++++++++--------- 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/js/apps/admin-ui/src/clients/add/LoginSettings.tsx b/js/apps/admin-ui/src/clients/add/LoginSettings.tsx index da87535dc2..00de1b21ba 100644 --- a/js/apps/admin-ui/src/clients/add/LoginSettings.tsx +++ b/js/apps/admin-ui/src/clients/add/LoginSettings.tsx @@ -26,6 +26,8 @@ export const LoginSettings = ({ const idpInitiatedSsoUrlName: string = watch( "attributes.saml_idp_initiated_sso_url_name" ); + + const standardFlowEnabled = watch("standardFlowEnabled"); return ( <> - - } - > - - - - } - > - - + {standardFlowEnabled && ( + <> + + } + > + + + + } + > + + {" "} + + )} {protocol === "saml" && ( <> )} - {protocol !== "saml" && ( + {protocol !== "saml" && standardFlowEnabled && (