From 0065e9c7c2267125a5ac7044484637ba8bda031d Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 21 Feb 2022 14:55:02 +0100 Subject: [PATCH] fixing labels in case of SAML (#2111) --- .../add/SamlConnectSettings.tsx | 8 +++++++- .../component/DiscoveryEndpointField.tsx | 20 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/identity-providers/add/SamlConnectSettings.tsx b/src/identity-providers/add/SamlConnectSettings.tsx index e6ca437d91..f07610b984 100644 --- a/src/identity-providers/add/SamlConnectSettings.tsx +++ b/src/identity-providers/add/SamlConnectSettings.tsx @@ -12,6 +12,7 @@ import { useRealm } from "../../context/realm-context/RealmContext"; import { DescriptorSettings } from "./DescriptorSettings"; import { getBaseUrl } from "../../util"; import { DiscoveryEndpointField } from "../component/DiscoveryEndpointField"; +import environment from "../../environment"; export const SamlConnectSettings = () => { const { t } = useTranslation("identity-providers"); @@ -70,13 +71,18 @@ export const SamlConnectSettings = () => { fieldLabelId="identity-providers:serviceProviderEntityId" /> } + isRequired + helperTextInvalid={t("common:required")} + validated={errors.config?.entityId ? "error" : "default"} > diff --git a/src/identity-providers/component/DiscoveryEndpointField.tsx b/src/identity-providers/component/DiscoveryEndpointField.tsx index 6a0910dce6..a94834a65e 100644 --- a/src/identity-providers/component/DiscoveryEndpointField.tsx +++ b/src/identity-providers/component/DiscoveryEndpointField.tsx @@ -64,11 +64,15 @@ export const DiscoveryEndpointField = ({ return ( <> } @@ -83,11 +87,15 @@ export const DiscoveryEndpointField = ({ {discovery && ( } @@ -113,7 +121,7 @@ export const DiscoveryEndpointField = ({ placeholder={ id === "oidc" ? "https://hostname/auth/realms/master/.well-known/openid-configuration" - : "https://hostname/context/saml/discovery" + : "" } onBlur={() => setDiscovering(true)} validated={