keycloak-scim/src/user-federation/UserFederationKerberosWizard.tsx

42 lines
1.4 KiB
TypeScript
Raw Normal View History

import { Wizard } from "@patternfly/react-core";
2020-11-18 16:18:32 +00:00
import { useTranslation } from "react-i18next";
import React from "react";
import { KerberosSettingsRequired } from "./kerberos/KerberosSettingsRequired";
import { SettingsCache } from "./shared/SettingsCache";
import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
import { useForm } from "react-hook-form";
2020-11-18 16:18:32 +00:00
export const UserFederationKerberosWizard = () => {
const { t } = useTranslation("user-federation");
const form = useForm<ComponentRepresentation>({ mode: "onChange" });
2020-11-18 16:18:32 +00:00
const steps = [
2020-12-15 22:50:09 +00:00
{
name: t("requiredSettings"),
component: (
<KerberosSettingsRequired
form={form}
showSectionHeading
showSectionDescription
/>
),
},
{
name: t("cacheSettings"),
component: (
<SettingsCache form={form} showSectionHeading showSectionDescription />
),
nextButtonText: t("common:finish"), // TODO: needs to disable until cache policy is valid
2020-12-15 22:50:09 +00:00
},
2020-11-18 16:18:32 +00:00
];
return (
<Wizard
2021-01-05 16:08:43 +00:00
// Because this is an inline wizard, this title and description should be put into the page. Specifying them here causes the wizard component to make a header that would be used on a modal.
// title={t("addKerberosWizardTitle")}
// description={helpText("addKerberosWizardDescription")}
2020-11-18 16:18:32 +00:00
steps={steps}
/>
);
};