parent
c97c804ad9
commit
586375b5f4
3 changed files with 10 additions and 1 deletions
|
@ -2,6 +2,7 @@ import React, { useState } from "react";
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { useFormContext, useWatch } from "react-hook-form";
|
||||
import {
|
||||
Divider,
|
||||
ExpandableSection,
|
||||
FormGroup,
|
||||
TextInput,
|
||||
|
@ -11,6 +12,8 @@ import {
|
|||
import { SwitchField } from "../component/SwitchField";
|
||||
import { TextField } from "../component/TextField";
|
||||
|
||||
import "./discovery-settings.css";
|
||||
|
||||
type DiscoverySettingsProps = {
|
||||
readOnly: boolean;
|
||||
};
|
||||
|
@ -124,6 +127,7 @@ export const DiscoverySettings = ({ readOnly }: DiscoverySettingsProps) => {
|
|||
<>
|
||||
{readOnly && (
|
||||
<ExpandableSection
|
||||
className="keycloak__discovery-settings__metadata"
|
||||
toggleText={isExpanded ? t("hideMetaData") : t("showMetaData")}
|
||||
onToggle={() => setIsExpanded(!isExpanded)}
|
||||
isExpanded={isExpanded}
|
||||
|
@ -132,6 +136,7 @@ export const DiscoverySettings = ({ readOnly }: DiscoverySettingsProps) => {
|
|||
</ExpandableSection>
|
||||
)}
|
||||
{!readOnly && <Fields readOnly={readOnly} />}
|
||||
<Divider />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
4
src/identity-providers/add/discovery-settings.css
Normal file
4
src/identity-providers/add/discovery-settings.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
.keycloak__discovery-settings__metadata .pf-c-expandable-section__toggle {
|
||||
margin-left: var(--pf-c-form--m-horizontal__group-label--md--GridColumnWidth);
|
||||
}
|
|
@ -36,7 +36,7 @@ export const SwitchField = ({
|
|||
onChange={(value) =>
|
||||
onChange(fieldType === "string" ? "" + value : value)
|
||||
}
|
||||
readOnly={isReadOnly}
|
||||
isDisabled={isReadOnly}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue