From 63b8f08be02d66e51f8372bd4040c8c2c6b063fb Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Fri, 12 Aug 2022 15:13:49 +0200 Subject: [PATCH] Add application URLs to SAML advanced tab (#3075) --- src/clients/advanced/ApplicationUrls.tsx | 71 +++++++++++++++++++ .../advanced/FineGrainOpenIdConnect.tsx | 59 +-------------- .../advanced/FineGrainSamlEndpointConfig.tsx | 2 + 3 files changed, 76 insertions(+), 56 deletions(-) create mode 100644 src/clients/advanced/ApplicationUrls.tsx diff --git a/src/clients/advanced/ApplicationUrls.tsx b/src/clients/advanced/ApplicationUrls.tsx new file mode 100644 index 0000000000..3744769403 --- /dev/null +++ b/src/clients/advanced/ApplicationUrls.tsx @@ -0,0 +1,71 @@ +import { useTranslation } from "react-i18next"; +import { useFormContext } from "react-hook-form"; +import { FormGroup } from "@patternfly/react-core"; + +import { HelpItem } from "../../components/help-enabler/HelpItem"; +import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput"; +import { convertAttributeNameToForm } from "../../util"; + +export const ApplicationUrls = () => { + const { t } = useTranslation("clients"); + const { register } = useFormContext(); + + return ( + <> + + } + > + + + + } + > + + + + } + > + + + + ); +}; diff --git a/src/clients/advanced/FineGrainOpenIdConnect.tsx b/src/clients/advanced/FineGrainOpenIdConnect.tsx index 0fe0b80673..f099c4b30b 100644 --- a/src/clients/advanced/FineGrainOpenIdConnect.tsx +++ b/src/clients/advanced/FineGrainOpenIdConnect.tsx @@ -15,7 +15,7 @@ import { HelpItem } from "../../components/help-enabler/HelpItem"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { convertAttributeNameToForm, sortProviders } from "../../util"; import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput"; -import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput"; +import { ApplicationUrls } from "./ApplicationUrls"; type FineGrainOpenIdConnectProps = { save: () => void; @@ -57,7 +57,7 @@ export const FineGrainOpenIdConnect = ({ setAuthorizationEncryptedResponseOpen, ] = useState(false); - const { control, register } = useFormContext(); + const { control } = useFormContext(); const keyOptions = [ @@ -148,60 +148,7 @@ export const FineGrainOpenIdConnect = ({ fineGrainedAccess={hasConfigureAccess} isHorizontal > - - } - > - - - - } - > - - - - } - > - - + >; @@ -20,6 +21,7 @@ export const FineGrainSamlEndpointConfig = ({ const { t } = useTranslation("clients"); return ( +