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

97 lines
2.8 KiB
TypeScript
Raw Normal View History

import { Form, FormGroup, Switch, TextInput } from "@patternfly/react-core";
import { useTranslation } from "react-i18next";
import React from "react";
import { HelpItem } from "../components/help-enabler/HelpItem";
export const LdapSettingsSynchronization = () => {
const { t } = useTranslation("user-federation");
const helpText = useTranslation("user-federation-help").t;
return (
<>
{/* Synchronization settings */}
<Form isHorizontal>
<FormGroup
label={t("importUsers")}
labelIcon={
<HelpItem
helpText={helpText("importUsersHelp")}
forLabel={t("importUsers")}
forID="kc-import-users"
/>
}
fieldId="kc-import-users"
hasNoPaddingTop
>
<Switch
id={"kc-import-users"}
isChecked={true}
isDisabled={false}
onChange={() => undefined as any} //TODO: switch shows/hides other fields
label={t("common:on")}
labelOff={t("common:off")}
/>
</FormGroup>
<FormGroup
label={t("batchSize")}
labelIcon={
<HelpItem
helpText={helpText("batchSizeHelp")}
forLabel={t("batchSize")}
forID="kc-batch-size"
/>
}
fieldId="kc-batch-size"
>
<TextInput type="text" id="kc-batch-size" name="batchSize" />
</FormGroup>
<FormGroup
label={t("periodicFullSync")}
labelIcon={
<HelpItem
helpText={helpText("periodicFullSyncHelp")}
forLabel={t("periodicFullSync")}
forID="kc-periodic-full-sync"
/>
}
fieldId="kc-periodic-full-sync"
hasNoPaddingTop
>
<Switch
id={"kc-periodic-full-sync"}
label={t("common:on")}
labelOff={t("common:off")}
isChecked={true}
isDisabled={false}
onChange={() => undefined as any}
/>
</FormGroup>
<FormGroup
label={t("periodicChangedUsersSync")}
labelIcon={
<HelpItem
helpText={helpText("periodicChangedUsersSyncHelp")}
forLabel={t("periodicChangedUsersSync")}
forID="kc-periodic-changed-users-sync"
/>
}
fieldId="kc-periodic-changed-users-sync"
hasNoPaddingTop
>
<Switch
id={"kc-periodic-changed-users-sync"}
isChecked={true}
isDisabled={false}
onChange={() => undefined as any}
label={t("common:on")}
labelOff={t("common:off")}
/>
</FormGroup>
</Form>
</>
);
};