small fixes
This commit is contained in:
parent
1521024abf
commit
27c25472ee
3 changed files with 27 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Controller, useFormContext } from "react-hook-form";
|
||||||
import {
|
import {
|
||||||
FormGroup,
|
FormGroup,
|
||||||
Switch,
|
Switch,
|
||||||
|
@ -8,11 +9,13 @@ import {
|
||||||
GridItem,
|
GridItem,
|
||||||
InputGroup,
|
InputGroup,
|
||||||
} from "@patternfly/react-core";
|
} from "@patternfly/react-core";
|
||||||
import { Controller, useFormContext } from "react-hook-form";
|
|
||||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||||
import { ClientForm } from "../ClientDetails";
|
import { ClientForm } from "../ClientDetails";
|
||||||
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
||||||
|
|
||||||
|
import "./capability-config.css";
|
||||||
|
|
||||||
type CapabilityConfigProps = {
|
type CapabilityConfigProps = {
|
||||||
unWrap?: boolean;
|
unWrap?: boolean;
|
||||||
protocol?: string;
|
protocol?: string;
|
||||||
|
@ -29,7 +32,12 @@ export const CapabilityConfig = ({
|
||||||
const authorization = watch("authorizationServicesEnabled");
|
const authorization = watch("authorizationServicesEnabled");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormAccess isHorizontal role="manage-clients" unWrap={unWrap}>
|
<FormAccess
|
||||||
|
isHorizontal
|
||||||
|
role="manage-clients"
|
||||||
|
unWrap={unWrap}
|
||||||
|
className="keycloak__capability-config__form"
|
||||||
|
>
|
||||||
<>
|
<>
|
||||||
{protocol === "openid-connect" && (
|
{protocol === "openid-connect" && (
|
||||||
<>
|
<>
|
||||||
|
@ -57,7 +65,13 @@ export const CapabilityConfig = ({
|
||||||
label={t("common:on")}
|
label={t("common:on")}
|
||||||
labelOff={t("common:off")}
|
labelOff={t("common:off")}
|
||||||
isChecked={!value}
|
isChecked={!value}
|
||||||
onChange={(value) => onChange(!value)}
|
onChange={(value) => {
|
||||||
|
onChange(!value);
|
||||||
|
if (!value) {
|
||||||
|
setValue("authorizationServicesEnabled", false);
|
||||||
|
setValue("serviceAccountsEnabled", false);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
@ -103,7 +117,7 @@ export const CapabilityConfig = ({
|
||||||
fieldId="kc-flow"
|
fieldId="kc-flow"
|
||||||
>
|
>
|
||||||
<Grid>
|
<Grid>
|
||||||
<GridItem lg={3} sm={6}>
|
<GridItem lg={4} sm={6}>
|
||||||
<Controller
|
<Controller
|
||||||
name="standardFlowEnabled"
|
name="standardFlowEnabled"
|
||||||
defaultValue={true}
|
defaultValue={true}
|
||||||
|
@ -127,7 +141,7 @@ export const CapabilityConfig = ({
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</GridItem>
|
</GridItem>
|
||||||
<GridItem lg={9} sm={6}>
|
<GridItem lg={8} sm={6}>
|
||||||
<Controller
|
<Controller
|
||||||
name="directAccessGrantsEnabled"
|
name="directAccessGrantsEnabled"
|
||||||
defaultValue={true}
|
defaultValue={true}
|
||||||
|
@ -151,7 +165,7 @@ export const CapabilityConfig = ({
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</GridItem>
|
</GridItem>
|
||||||
<GridItem lg={3} sm={6}>
|
<GridItem lg={4} sm={6}>
|
||||||
<Controller
|
<Controller
|
||||||
name="implicitFlowEnabled"
|
name="implicitFlowEnabled"
|
||||||
defaultValue={false}
|
defaultValue={false}
|
||||||
|
@ -175,7 +189,7 @@ export const CapabilityConfig = ({
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</GridItem>
|
</GridItem>
|
||||||
<GridItem lg={9} sm={6}>
|
<GridItem lg={8} sm={6}>
|
||||||
<Controller
|
<Controller
|
||||||
name="serviceAccountsEnabled"
|
name="serviceAccountsEnabled"
|
||||||
defaultValue={false}
|
defaultValue={false}
|
||||||
|
|
5
src/clients/add/capability-config.css
Normal file
5
src/clients/add/capability-config.css
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.keycloak__capability-config__form .pf-c-form__group {
|
||||||
|
--pf-c-form--m-horizontal__group-label--md--GridColumnWidth: 10rem;
|
||||||
|
}
|
||||||
|
}
|
|
@ -104,7 +104,7 @@
|
||||||
"authenticationFlow": "Authentication flow",
|
"authenticationFlow": "Authentication flow",
|
||||||
"standardFlow": "Standard flow",
|
"standardFlow": "Standard flow",
|
||||||
"directAccess": "Direct access grants",
|
"directAccess": "Direct access grants",
|
||||||
"serviceAccount": "Service account",
|
"serviceAccount": "Service accounts",
|
||||||
"enableServiceAccount": "Enable service account roles",
|
"enableServiceAccount": "Enable service account roles",
|
||||||
"assignRolesTo": "Assign roles to {{client}} account",
|
"assignRolesTo": "Assign roles to {{client}} account",
|
||||||
"searchByRoleName": "Search by role name",
|
"searchByRoleName": "Search by role name",
|
||||||
|
|
Loading…
Reference in a new issue