use input instead of TextInput to make them truly hidden (#28618)
fixes: #28546 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
8a0cb36673
commit
426c13967d
3 changed files with 24 additions and 17 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { FormGroup, Switch, TextInput } from "@patternfly/react-core";
|
import { FormGroup, Switch } from "@patternfly/react-core";
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
SelectOption,
|
||||||
|
@ -61,17 +61,21 @@ export const KerberosSettingsRequired = ({
|
||||||
{/* Required settings */}
|
{/* Required settings */}
|
||||||
<FormAccess role="manage-realm" isHorizontal>
|
<FormAccess role="manage-realm" isHorizontal>
|
||||||
{/* These hidden fields are required so data object written back matches data retrieved */}
|
{/* These hidden fields are required so data object written back matches data retrieved */}
|
||||||
<TextInput
|
<input
|
||||||
hidden
|
type="hidden"
|
||||||
defaultValue="kerberos"
|
defaultValue="kerberos"
|
||||||
{...form.register("providerId")}
|
{...form.register("providerId")}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<input
|
||||||
hidden
|
type="hidden"
|
||||||
defaultValue="org.keycloak.storage.UserStorageProvider"
|
defaultValue="org.keycloak.storage.UserStorageProvider"
|
||||||
{...form.register("providerType")}
|
{...form.register("providerType")}
|
||||||
/>
|
/>
|
||||||
<TextInput hidden defaultValue={realm} {...form.register("parentId")} />
|
<input
|
||||||
|
type="hidden"
|
||||||
|
defaultValue={realm}
|
||||||
|
{...form.register("parentId")}
|
||||||
|
/>
|
||||||
<TextControl
|
<TextControl
|
||||||
name="name"
|
name="name"
|
||||||
label={t("uiDisplayName")}
|
label={t("uiDisplayName")}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
|
import ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
|
||||||
import { FormGroup, TextInput } from "@patternfly/react-core";
|
import { FormGroup } from "@patternfly/react-core";
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
SelectOption,
|
||||||
|
@ -107,17 +107,21 @@ export const LdapSettingsGeneral = ({
|
||||||
)}
|
)}
|
||||||
<FormAccess role="manage-realm" isHorizontal>
|
<FormAccess role="manage-realm" isHorizontal>
|
||||||
{/* These hidden fields are required so data object written back matches data retrieved */}
|
{/* These hidden fields are required so data object written back matches data retrieved */}
|
||||||
<TextInput
|
<input
|
||||||
hidden
|
type="hidden"
|
||||||
defaultValue="ldap"
|
defaultValue="ldap"
|
||||||
{...form.register("providerId")}
|
{...form.register("providerId")}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<input
|
||||||
hidden
|
type="hidden"
|
||||||
defaultValue="org.keycloak.storage.UserStorageProvider"
|
defaultValue="org.keycloak.storage.UserStorageProvider"
|
||||||
{...form.register("providerType")}
|
{...form.register("providerType")}
|
||||||
/>
|
/>
|
||||||
<TextInput hidden defaultValue={realm} {...form.register("parentId")} />
|
<input
|
||||||
|
type="hidden"
|
||||||
|
defaultValue={realm}
|
||||||
|
{...form.register("parentId")}
|
||||||
|
/>
|
||||||
<TextControl
|
<TextControl
|
||||||
name="name"
|
name="name"
|
||||||
label={t("uiDisplayName")}
|
label={t("uiDisplayName")}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import {
|
||||||
ButtonVariant,
|
ButtonVariant,
|
||||||
FormGroup,
|
FormGroup,
|
||||||
PageSection,
|
PageSection,
|
||||||
TextInput,
|
|
||||||
} from "@patternfly/react-core";
|
} from "@patternfly/react-core";
|
||||||
import {
|
import {
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
|
@ -222,14 +221,14 @@ export default function LdapMapperDetails() {
|
||||||
isDisabled={!isNew}
|
isDisabled={!isNew}
|
||||||
rules={{ required: t("required") }}
|
rules={{ required: t("required") }}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<input
|
||||||
hidden
|
type="hidden"
|
||||||
defaultValue={isNew ? id : mapping ? mapping.parentId : ""}
|
defaultValue={isNew ? id : mapping ? mapping.parentId : ""}
|
||||||
data-testid="ldap-mapper-parentId"
|
data-testid="ldap-mapper-parentId"
|
||||||
{...form.register("parentId")}
|
{...form.register("parentId")}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<input
|
||||||
hidden
|
type="hidden"
|
||||||
defaultValue="org.keycloak.storage.ldap.mappers.LDAPStorageMapper"
|
defaultValue="org.keycloak.storage.ldap.mappers.LDAPStorageMapper"
|
||||||
data-testid="ldap-mapper-provider-type"
|
data-testid="ldap-mapper-provider-type"
|
||||||
{...form.register("providerType")}
|
{...form.register("providerType")}
|
||||||
|
|
Loading…
Reference in a new issue