fix: refactor connector form

This commit is contained in:
Maël Gangloff
2025-02-18 17:32:34 +01:00
parent ac5b9d5d4c
commit 3cca7c8213
7 changed files with 66 additions and 69 deletions

View File

@@ -22,6 +22,8 @@ export default function OvhCloudConnectorForm({form, onCreate}: {
const [open, setOpen] = useState(false)
const [ovhPricingModeValue, setOvhPricingModeValue] = useState<string | undefined>()
form.setFieldValue('provider', ConnectorProvider.OVHcloud)
const ovhFields = {
appKey: t`Application key`,
appSecret: t`Application secret`,
@@ -53,10 +55,6 @@ export default function OvhCloudConnectorForm({form, onCreate}: {
wrapperCol={{span: 14}}
onFinish={onCreate}
>
<Form.Item name='provider' hidden>
<Input value={ConnectorProvider.OVHcloud}/>
</Form.Item>
{
Object.keys(ovhFields).map(fieldName => <Form.Item
key={ovhFields[fieldName as keyof typeof ovhFields]}