From 2578705f7860d6861e723dc20ad0e102af324450 Mon Sep 17 00:00:00 2001 From: agagancarczyk <4890675+agagancarczyk@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:08:56 +0000 Subject: [PATCH] replaced KeycloakTextInput with TextControl (#27658) Signed-off-by: Agnieszka Gancarczyk Co-authored-by: Agnieszka Gancarczyk --- .../clients/registration/DetailProvider.tsx | 98 ++++++------------- 1 file changed, 31 insertions(+), 67 deletions(-) diff --git a/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx b/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx index 9409cbd528..9f48a04cf0 100644 --- a/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx +++ b/js/apps/admin-ui/src/clients/registration/DetailProvider.tsx @@ -5,23 +5,19 @@ import { Button, ButtonVariant, DropdownItem, - FormGroup, PageSection, - ValidatedOptions, } from "@patternfly/react-core"; import { useState } from "react"; import { FormProvider, useForm, useWatch } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { Link, useNavigate } from "react-router-dom"; -import { HelpItem } from "ui-shared"; - +import { TextControl } from "ui-shared"; import { adminClient } from "../../admin-client"; import { useAlerts } from "../../components/alert/Alerts"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { DynamicComponents } from "../../components/dynamic/DynamicComponents"; import { FormAccess } from "../../components/form/FormAccess"; import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; -import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput"; import { ViewHeader } from "../../components/view-header/ViewHeader"; import { useRealm } from "../../context/realm-context/RealmContext"; import { useFetch } from "../../utils/useFetch"; @@ -39,13 +35,7 @@ export default function DetailProvider() { const form = useForm({ defaultValues: { providerId }, }); - const { - register, - control, - handleSubmit, - reset, - formState: { errors }, - } = form; + const { control, handleSubmit, reset } = form; const { realm } = useRealm(); const { addAlert, addError } = useAlerts(); @@ -142,64 +132,38 @@ export default function DetailProvider() { /> - - - - - - } - isRequired + + - + - - - - - - - - + + + + + + );