| 1 |
import React from "react"; |
| 2 |
// PatternFly |
| 3 |
import { Flex, FlexItem, Form, FormGroup } from "@patternfly/react-core"; |
| 4 |
// Data types |
| 5 |
import { Metadata } from "src/utils/datatypes/globalDataTypes"; |
| 6 |
// Form |
| 7 |
import IpaTextArea from "src/components/Form/IpaTextArea"; |
| 8 |
import ConfigObjectclassTable from "./ConfigObjectclassTable"; |
| 9 |
|
| 10 |
interface PropsToGroupOptions { |
| 11 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 12 |
ipaObject: Record<string, any>; |
| 13 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 14 |
recordOnChange: (ipaObject: Record<string, any>) => void; |
| 15 |
metadata: Metadata; |
| 16 |
} |
| 17 |
|
| 18 |
const ConfigGroupOptions = (props: PropsToGroupOptions) => { |
| 19 |
return ( |
| 20 |
<Flex direction={{ default: "column" }} flex={{ default: "flex_1" }}> |
| 21 |
<FlexItem flex={{ default: "flex_1" }}> |
| 22 |
<Form className="pf-v6-u-mb-lg pf-v6-u-mt-lg" isHorizontal> |
| 23 |
<FormGroup |
| 24 |
label="Group search fields" |
| 25 |
fieldId="ipagroupsearchfields" |
| 26 |
isRequired |
| 27 |
> |
| 28 |
<IpaTextArea |
| 29 |
dataCy="configuration-textbox-ipagroupsearchfields" |
| 30 |
name="ipagroupsearchfields" |
| 31 |
ipaObject={props.ipaObject} |
| 32 |
onChange={props.recordOnChange} |
| 33 |
objectName="config" |
| 34 |
metadata={props.metadata} |
| 35 |
/> |
| 36 |
</FormGroup> |
| 37 |
</Form> |
| 38 |
<Form className="pf-v6-u-mb-lg pf-v6-u-mt-lg"> |
| 39 |
<FormGroup |
| 40 |
label="Default group objectclasses" |
| 41 |
fieldId="ipagroupobjectclasses" |
| 42 |
role="group" |
| 43 |
> |
| 44 |
<ConfigObjectclassTable |
| 45 |
title="Default group objectclasses" |
| 46 |
name="ipagroupobjectclasses" |
| 47 |
ipaObject={props.ipaObject} |
| 48 |
onChange={props.recordOnChange} |
| 49 |
objectName="config" |
| 50 |
metadata={props.metadata} |
| 51 |
/> |
| 52 |
</FormGroup> |
| 53 |
</Form> |
| 54 |
</FlexItem> |
| 55 |
</Flex> |
| 56 |
); |
| 57 |
}; |
| 58 |
|
| 59 |
export default ConfigGroupOptions; |