keycloak-scim/src/user-federation/LdapSettingsSynchronization.tsx
Sarah Rambacher 6b3990e1b9
540 user fed settings (#198)
* all fields roughed in working on tab

* reduce to just the settings without page

* remove unused imports

* fix some comments

* correct some typos and capitalization

* remove ldap translation
2020-10-30 16:15:37 -04:00

96 lines
2.8 KiB
TypeScript

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>
</>
);
};