Port import form to new form controls (#27568)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
d124b02a95
commit
d1c9e97a12
1 changed files with 3 additions and 10 deletions
|
@ -5,19 +5,18 @@ import {
|
|||
ActionGroup,
|
||||
AlertVariant,
|
||||
Button,
|
||||
FormGroup,
|
||||
PageSection,
|
||||
} from "@patternfly/react-core";
|
||||
import { useState } from "react";
|
||||
import { FormProvider, useForm } from "react-hook-form";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { TextControl } from "ui-shared";
|
||||
|
||||
import { adminClient } from "../../admin-client";
|
||||
import { useAlerts } from "../../components/alert/Alerts";
|
||||
import { FormAccess } from "../../components/form/FormAccess";
|
||||
import { FileUploadForm } from "../../components/json-file-upload/FileUploadForm";
|
||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||
import { ViewHeader } from "../../components/view-header/ViewHeader";
|
||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
import {
|
||||
|
@ -39,7 +38,7 @@ export default function ImportForm() {
|
|||
const navigate = useNavigate();
|
||||
const { realm } = useRealm();
|
||||
const form = useForm<FormFields>();
|
||||
const { register, handleSubmit, setValue } = form;
|
||||
const { handleSubmit, setValue } = form;
|
||||
const [imported, setImported] = useState<ClientRepresentation>({});
|
||||
|
||||
const { addAlert, addError } = useAlerts();
|
||||
|
@ -116,13 +115,7 @@ export default function ImportForm() {
|
|||
onChange={handleFileChange}
|
||||
/>
|
||||
<ClientDescription hasConfigureAccess />
|
||||
<FormGroup label={t("type")} fieldId="kc-type">
|
||||
<KeycloakTextInput
|
||||
id="kc-type"
|
||||
isReadOnly
|
||||
{...register("protocol")}
|
||||
/>
|
||||
</FormGroup>
|
||||
<TextControl name="protocol" label={t("type")} readOnly />
|
||||
<CapabilityConfig unWrap={true} />
|
||||
<ActionGroup>
|
||||
<Button variant="primary" type="submit">
|
||||
|
|
Loading…
Reference in a new issue