Port group client authorization policy to new form controls (#27570)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
d1c9e97a12
commit
a3c6139a2f
1 changed files with 5 additions and 19 deletions
|
@ -12,11 +12,10 @@ import {
|
|||
import { useState } from "react";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { HelpItem } from "ui-shared";
|
||||
import { HelpItem, TextControl } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../../admin-client";
|
||||
import { GroupPickerDialog } from "../../../components/group/GroupPickerDialog";
|
||||
import { KeycloakTextInput } from "../../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { useFetch } from "../../../utils/useFetch";
|
||||
|
||||
type GroupForm = {
|
||||
|
@ -33,7 +32,6 @@ export const Group = () => {
|
|||
const { t } = useTranslation();
|
||||
const {
|
||||
control,
|
||||
register,
|
||||
getValues,
|
||||
setValue,
|
||||
formState: { errors },
|
||||
|
@ -62,23 +60,11 @@ export const Group = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<FormGroup
|
||||
<TextControl
|
||||
name="groupsClaim"
|
||||
label={t("groupsClaim")}
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText={t("groupsClaimHelp")}
|
||||
fieldLabelId="groupsClaim"
|
||||
/>
|
||||
}
|
||||
fieldId="groups"
|
||||
>
|
||||
<KeycloakTextInput
|
||||
type="text"
|
||||
id="groupsClaim"
|
||||
data-testid="groupsClaim"
|
||||
{...register("groupsClaim")}
|
||||
/>
|
||||
</FormGroup>
|
||||
labelIcon={t("groupsClaimHelp")}
|
||||
/>
|
||||
<FormGroup
|
||||
label={t("groups")}
|
||||
labelIcon={
|
||||
|
|
Loading…
Reference in a new issue