2023-01-26 09:31:07 +00:00
|
|
|
// @ts-nocheck
|
2020-10-30 20:15:37 +00:00
|
|
|
import {
|
|
|
|
FormGroup,
|
|
|
|
Select,
|
|
|
|
SelectOption,
|
2020-11-25 14:50:40 +00:00
|
|
|
SelectVariant,
|
2020-10-30 20:15:37 +00:00
|
|
|
Switch,
|
|
|
|
} from "@patternfly/react-core";
|
2022-08-03 12:12:07 +00:00
|
|
|
import { useState } from "react";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { Controller, UseFormReturn } from "react-hook-form";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
2020-12-16 07:02:41 +00:00
|
|
|
import { FormAccess } from "../../components/form-access/FormAccess";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
2022-04-21 15:03:26 +00:00
|
|
|
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { WizardSectionHeader } from "../../components/wizard-section-header/WizardSectionHeader";
|
2020-10-30 20:15:37 +00:00
|
|
|
|
2021-01-04 21:33:18 +00:00
|
|
|
export type LdapSettingsSearchingProps = {
|
2023-01-26 09:31:07 +00:00
|
|
|
form: UseFormReturn;
|
2021-01-04 21:33:18 +00:00
|
|
|
showSectionHeading?: boolean;
|
|
|
|
showSectionDescription?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const LdapSettingsSearching = ({
|
2021-01-26 01:41:14 +00:00
|
|
|
form,
|
2021-01-04 21:33:18 +00:00
|
|
|
showSectionHeading = false,
|
|
|
|
showSectionDescription = false,
|
|
|
|
}: LdapSettingsSearchingProps) => {
|
2020-10-30 20:15:37 +00:00
|
|
|
const { t } = useTranslation("user-federation");
|
2021-12-14 14:56:36 +00:00
|
|
|
const { t: helpText } = useTranslation("user-federation-help");
|
2021-01-26 01:41:14 +00:00
|
|
|
|
2021-07-05 11:24:10 +00:00
|
|
|
const [isSearchScopeDropdownOpen, setIsSearchScopeDropdownOpen] =
|
|
|
|
useState(false);
|
2021-01-26 01:41:14 +00:00
|
|
|
const [isEditModeDropdownOpen, setIsEditModeDropdownOpen] = useState(false);
|
2020-11-25 14:50:40 +00:00
|
|
|
|
2020-10-30 20:15:37 +00:00
|
|
|
return (
|
|
|
|
<>
|
2021-01-04 21:33:18 +00:00
|
|
|
{showSectionHeading && (
|
|
|
|
<WizardSectionHeader
|
|
|
|
title={t("ldapSearchingAndUpdatingSettings")}
|
|
|
|
description={helpText("ldapSearchingAndUpdatingSettingsDescription")}
|
|
|
|
showDescription={showSectionDescription}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
|
2020-11-25 16:17:50 +00:00
|
|
|
<FormAccess role="manage-realm" isHorizontal>
|
2020-10-30 20:15:37 +00:00
|
|
|
<FormGroup
|
|
|
|
label={t("editMode")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:editModeLdapHelp"
|
|
|
|
fieldLabelId="user-federation:editMode"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-edit-mode"
|
2021-09-23 14:11:41 +00:00
|
|
|
isRequired
|
2023-01-26 09:31:07 +00:00
|
|
|
validated={
|
|
|
|
form.formState.errors.config?.editMode?.[0] ? "error" : "default"
|
|
|
|
}
|
|
|
|
helperTextInvalid={
|
|
|
|
form.formState.errors.config?.editMode?.[0].message
|
|
|
|
}
|
2020-10-30 20:15:37 +00:00
|
|
|
>
|
2020-11-25 14:50:40 +00:00
|
|
|
<Controller
|
2021-01-26 01:41:14 +00:00
|
|
|
name="config.editMode[0]"
|
2020-11-25 14:50:40 +00:00
|
|
|
defaultValue=""
|
2021-01-26 01:41:14 +00:00
|
|
|
control={form.control}
|
2021-09-23 14:11:41 +00:00
|
|
|
rules={{
|
|
|
|
required: { value: true, message: t("validateEditMode") },
|
|
|
|
}}
|
2023-01-26 09:31:07 +00:00
|
|
|
render={({ field }) => (
|
2020-11-25 14:50:40 +00:00
|
|
|
<Select
|
|
|
|
toggleId="kc-edit-mode"
|
|
|
|
required
|
|
|
|
onToggle={() =>
|
|
|
|
setIsEditModeDropdownOpen(!isEditModeDropdownOpen)
|
|
|
|
}
|
|
|
|
isOpen={isEditModeDropdownOpen}
|
|
|
|
onSelect={(_, value) => {
|
2023-01-26 09:31:07 +00:00
|
|
|
field.onChange(value.toString());
|
2020-11-25 14:50:40 +00:00
|
|
|
setIsEditModeDropdownOpen(false);
|
|
|
|
}}
|
2023-01-26 09:31:07 +00:00
|
|
|
selections={field.value}
|
2020-11-25 14:50:40 +00:00
|
|
|
variant={SelectVariant.single}
|
2022-03-29 07:49:43 +00:00
|
|
|
validated={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.editMode?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
2022-03-29 07:49:43 +00:00
|
|
|
}
|
2020-11-25 14:50:40 +00:00
|
|
|
>
|
2021-09-23 14:11:41 +00:00
|
|
|
<SelectOption value="" isPlaceholder />
|
|
|
|
<SelectOption value="READ_ONLY" />
|
|
|
|
<SelectOption value="WRITABLE" />
|
|
|
|
<SelectOption value="UNSYNCED" />
|
2020-11-25 14:50:40 +00:00
|
|
|
</Select>
|
|
|
|
)}
|
2021-09-23 14:11:41 +00:00
|
|
|
/>
|
2020-10-30 20:15:37 +00:00
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("usersDN")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:usersDNHelp"
|
|
|
|
fieldLabelId="user-federation:usersDn"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
2022-12-07 15:28:28 +00:00
|
|
|
fieldId="kc-ui-users-dn"
|
2020-10-30 20:15:37 +00:00
|
|
|
isRequired
|
2023-01-26 09:31:07 +00:00
|
|
|
validated={
|
|
|
|
form.formState.errors.config?.usersDn?.[0] ? "error" : "default"
|
|
|
|
}
|
|
|
|
helperTextInvalid={form.formState.errors.config?.usersDn?.[0].message}
|
2020-10-30 20:15:37 +00:00
|
|
|
>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2020-10-30 20:15:37 +00:00
|
|
|
isRequired
|
2021-05-14 18:12:27 +00:00
|
|
|
defaultValue=""
|
2022-12-07 15:28:28 +00:00
|
|
|
id="kc-ui-users-dn"
|
2021-02-23 20:49:57 +00:00
|
|
|
data-testid="ldap-users-dn"
|
2023-01-26 09:31:07 +00:00
|
|
|
validated={
|
|
|
|
form.formState.errors.config?.usersDn?.[0] ? "error" : "default"
|
|
|
|
}
|
|
|
|
{...form.register("config.usersDn.0", {
|
2021-01-26 01:41:14 +00:00
|
|
|
required: {
|
|
|
|
value: true,
|
2023-01-26 09:31:07 +00:00
|
|
|
message: t("validateUsersDn").toString(),
|
2021-01-26 01:41:14 +00:00
|
|
|
},
|
|
|
|
})}
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("usernameLdapAttribute")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:usernameLdapAttributeHelp"
|
|
|
|
fieldLabelId="user-federation:usernameLdapAttribute"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-username-ldap-attribute"
|
|
|
|
isRequired
|
2022-03-29 07:49:43 +00:00
|
|
|
validated={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.usernameLDAPAttribute?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
2022-03-29 07:49:43 +00:00
|
|
|
}
|
|
|
|
helperTextInvalid={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.usernameLDAPAttribute?.[0].message
|
2022-03-29 07:49:43 +00:00
|
|
|
}
|
2020-10-30 20:15:37 +00:00
|
|
|
>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2020-10-30 20:15:37 +00:00
|
|
|
isRequired
|
2021-05-14 18:12:27 +00:00
|
|
|
defaultValue="cn"
|
2020-10-30 20:15:37 +00:00
|
|
|
id="kc-username-ldap-attribute"
|
2021-02-23 20:49:57 +00:00
|
|
|
data-testid="ldap-username-attribute"
|
2023-01-26 09:31:07 +00:00
|
|
|
validated={
|
|
|
|
form.formState.errors.config?.usernameLDAPAttribute?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
{...form.register("config.usernameLDAPAttribute.0", {
|
2021-01-26 01:41:14 +00:00
|
|
|
required: {
|
|
|
|
value: true,
|
|
|
|
message: `${t("validateUsernameLDAPAttribute")}`,
|
|
|
|
},
|
|
|
|
})}
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("rdnLdapAttribute")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:rdnLdapAttributeHelp"
|
|
|
|
fieldLabelId="user-federation:rdnLdapAttribute"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-rdn-ldap-attribute"
|
|
|
|
isRequired
|
2022-03-29 07:49:43 +00:00
|
|
|
validated={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.rdnLDAPAttribute?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
helperTextInvalid={
|
|
|
|
form.formState.errors.config?.rdnLDAPAttribute?.[0].message
|
2022-03-29 07:49:43 +00:00
|
|
|
}
|
2020-10-30 20:15:37 +00:00
|
|
|
>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2020-10-30 20:15:37 +00:00
|
|
|
isRequired
|
2021-05-14 18:12:27 +00:00
|
|
|
defaultValue="cn"
|
2020-10-30 20:15:37 +00:00
|
|
|
id="kc-rdn-ldap-attribute"
|
2021-02-23 20:49:57 +00:00
|
|
|
data-testid="ldap-rdn-attribute"
|
2023-01-26 09:31:07 +00:00
|
|
|
validated={
|
|
|
|
form.formState.errors.config?.rdnLDAPAttribute?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
{...form.register("config.rdnLDAPAttribute.0", {
|
2021-01-26 01:41:14 +00:00
|
|
|
required: {
|
|
|
|
value: true,
|
|
|
|
message: `${t("validateRdnLdapAttribute")}`,
|
|
|
|
},
|
|
|
|
})}
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("uuidLdapAttribute")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:uuidLdapAttributeHelp"
|
|
|
|
fieldLabelId="user-federation:uuidLdapAttribute"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-uuid-ldap-attribute"
|
|
|
|
isRequired
|
2022-03-29 07:49:43 +00:00
|
|
|
validated={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.uuidLDAPAttribute?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
helperTextInvalid={
|
|
|
|
form.formState.errors.config?.uuidLDAPAttribute?.[0].message
|
2022-03-29 07:49:43 +00:00
|
|
|
}
|
2020-10-30 20:15:37 +00:00
|
|
|
>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2020-10-30 20:15:37 +00:00
|
|
|
isRequired
|
2021-05-14 18:12:27 +00:00
|
|
|
defaultValue="objectGUID"
|
2020-10-30 20:15:37 +00:00
|
|
|
id="kc-uuid-ldap-attribute"
|
2021-02-23 20:49:57 +00:00
|
|
|
data-testid="ldap-uuid-attribute"
|
2023-01-26 09:31:07 +00:00
|
|
|
validated={
|
|
|
|
form.formState.errors.config?.uuidLDAPAttribute?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
{...form.register("config.uuidLDAPAttribute.0", {
|
2021-01-26 01:41:14 +00:00
|
|
|
required: {
|
|
|
|
value: true,
|
|
|
|
message: `${t("validateUuidLDAPAttribute")}`,
|
|
|
|
},
|
|
|
|
})}
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("userObjectClasses")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:userObjectClassesHelp"
|
|
|
|
fieldLabelId="user-federation:userObjectClasses"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-user-object-classes"
|
|
|
|
isRequired
|
2022-03-29 07:49:43 +00:00
|
|
|
validated={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.userObjectClasses?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
helperTextInvalid={
|
|
|
|
form.formState.errors.config?.userObjectClasses?.[0].message
|
2022-03-29 07:49:43 +00:00
|
|
|
}
|
2020-10-30 20:15:37 +00:00
|
|
|
>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2020-10-30 20:15:37 +00:00
|
|
|
isRequired
|
2021-05-14 18:12:27 +00:00
|
|
|
defaultValue="person, organizationalPerson, user"
|
2020-10-30 20:15:37 +00:00
|
|
|
id="kc-user-object-classes"
|
2021-02-23 20:49:57 +00:00
|
|
|
data-testid="ldap-user-object-classes"
|
2023-01-26 09:31:07 +00:00
|
|
|
validated={
|
|
|
|
form.formState.errors.config?.userObjectClasses?.[0]
|
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
{...form.register("config.userObjectClasses.0", {
|
2021-01-26 01:41:14 +00:00
|
|
|
required: {
|
|
|
|
value: true,
|
2023-01-26 09:31:07 +00:00
|
|
|
message: t("validateUserObjectClasses").toString(),
|
2021-01-26 01:41:14 +00:00
|
|
|
},
|
|
|
|
})}
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("userLdapFilter")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:userLdapFilterHelp"
|
|
|
|
fieldLabelId="user-federation:userLdapFilter"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-user-ldap-filter"
|
2022-03-29 07:49:43 +00:00
|
|
|
validated={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.customUserSearchFilter?.[0]
|
2022-03-29 07:49:43 +00:00
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
|
|
|
helperTextInvalid={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.customUserSearchFilter?.[0].message
|
2022-03-29 07:49:43 +00:00
|
|
|
}
|
2020-10-30 20:15:37 +00:00
|
|
|
>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2020-12-16 07:02:41 +00:00
|
|
|
id="kc-user-ldap-filter"
|
2022-04-08 09:47:14 +00:00
|
|
|
data-testid="user-ldap-filter"
|
2022-03-29 07:49:43 +00:00
|
|
|
validated={
|
2023-01-26 09:31:07 +00:00
|
|
|
form.formState.errors.config?.customUserSearchFilter?.[0]
|
2022-03-29 07:49:43 +00:00
|
|
|
? "error"
|
|
|
|
: "default"
|
|
|
|
}
|
2023-01-26 09:31:07 +00:00
|
|
|
{...form.register("config.customUserSearchFilter.0", {
|
|
|
|
pattern: {
|
|
|
|
value: /(\(.*\))$/,
|
|
|
|
message: t("validateCustomUserSearchFilter").toString(),
|
|
|
|
},
|
|
|
|
})}
|
2020-12-16 07:02:41 +00:00
|
|
|
/>
|
2020-10-30 20:15:37 +00:00
|
|
|
</FormGroup>
|
2021-01-26 01:41:14 +00:00
|
|
|
|
2020-10-30 20:15:37 +00:00
|
|
|
<FormGroup
|
|
|
|
label={t("searchScope")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:searchScopeHelp"
|
|
|
|
fieldLabelId="user-federation:searchScope"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-search-scope"
|
|
|
|
>
|
2020-11-25 14:50:40 +00:00
|
|
|
<Controller
|
2021-01-26 01:41:14 +00:00
|
|
|
name="config.searchScope[0]"
|
2020-11-25 14:50:40 +00:00
|
|
|
defaultValue=""
|
2021-01-26 01:41:14 +00:00
|
|
|
control={form.control}
|
2023-01-26 09:31:07 +00:00
|
|
|
render={({ field }) => (
|
2020-11-25 14:50:40 +00:00
|
|
|
<Select
|
|
|
|
toggleId="kc-search-scope"
|
|
|
|
required
|
|
|
|
onToggle={() =>
|
|
|
|
setIsSearchScopeDropdownOpen(!isSearchScopeDropdownOpen)
|
|
|
|
}
|
|
|
|
isOpen={isSearchScopeDropdownOpen}
|
|
|
|
onSelect={(_, value) => {
|
2023-01-26 09:31:07 +00:00
|
|
|
field.onChange(value as string);
|
2020-11-25 14:50:40 +00:00
|
|
|
setIsSearchScopeDropdownOpen(false);
|
|
|
|
}}
|
2023-01-26 09:31:07 +00:00
|
|
|
selections={field.value}
|
2020-11-25 14:50:40 +00:00
|
|
|
variant={SelectVariant.single}
|
|
|
|
>
|
2021-01-26 01:41:14 +00:00
|
|
|
<SelectOption key={0} value="1" isPlaceholder>
|
|
|
|
{t("oneLevel")}
|
|
|
|
</SelectOption>
|
|
|
|
<SelectOption key={1} value="2">
|
|
|
|
{t("subtree")}
|
|
|
|
</SelectOption>
|
2020-11-25 14:50:40 +00:00
|
|
|
</Select>
|
|
|
|
)}
|
|
|
|
></Controller>
|
2020-10-30 20:15:37 +00:00
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("readTimeout")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:readTimeoutHelp"
|
|
|
|
fieldLabelId="user-federation:readTimeout"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="kc-read-timeout"
|
|
|
|
>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2021-02-22 19:48:03 +00:00
|
|
|
type="number"
|
2021-03-02 15:37:51 +00:00
|
|
|
min={0}
|
2020-10-30 20:15:37 +00:00
|
|
|
id="kc-read-timeout"
|
2022-04-08 09:47:14 +00:00
|
|
|
data-testid="ldap-read-timeout"
|
2023-01-26 09:31:07 +00:00
|
|
|
{...form.register("config.readTimeout.0")}
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("pagination")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2021-12-14 14:56:36 +00:00
|
|
|
helpText="user-federation-help:paginationHelp"
|
|
|
|
fieldLabelId="user-federation:pagination"
|
2020-10-30 20:15:37 +00:00
|
|
|
/>
|
|
|
|
}
|
2022-12-07 15:28:28 +00:00
|
|
|
fieldId="kc-ui-pagination"
|
2020-10-30 20:15:37 +00:00
|
|
|
hasNoPaddingTop
|
|
|
|
>
|
2020-11-25 14:50:40 +00:00
|
|
|
<Controller
|
2020-12-16 07:02:41 +00:00
|
|
|
name="config.pagination"
|
2021-02-19 23:13:07 +00:00
|
|
|
defaultValue={["false"]}
|
2021-01-26 01:41:14 +00:00
|
|
|
control={form.control}
|
2023-01-26 09:31:07 +00:00
|
|
|
render={({ field }) => (
|
2020-11-25 14:50:40 +00:00
|
|
|
<Switch
|
2022-12-07 15:28:28 +00:00
|
|
|
id="kc-ui-pagination"
|
|
|
|
data-testid="ui-pagination"
|
2020-11-25 14:50:40 +00:00
|
|
|
isDisabled={false}
|
2023-01-26 09:31:07 +00:00
|
|
|
onChange={(value) => field.onChange([`${value}`])}
|
|
|
|
isChecked={field.value[0] === "true"}
|
2020-11-25 14:50:40 +00:00
|
|
|
label={t("common:on")}
|
|
|
|
labelOff={t("common:off")}
|
2022-08-30 13:07:51 +00:00
|
|
|
aria-label={t("pagination")}
|
2020-11-25 14:50:40 +00:00
|
|
|
/>
|
|
|
|
)}
|
|
|
|
></Controller>
|
2020-10-30 20:15:37 +00:00
|
|
|
</FormGroup>
|
2020-11-25 16:17:50 +00:00
|
|
|
</FormAccess>
|
2020-10-30 20:15:37 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|