diff --git a/assets/components/tracking/ConnectorForm.tsx b/assets/components/tracking/ConnectorForm.tsx index 5954297..241ed3d 100644 --- a/assets/components/tracking/ConnectorForm.tsx +++ b/assets/components/tracking/ConnectorForm.tsx @@ -1,8 +1,124 @@ -import {FormInstance} from "antd"; -import React from "react"; -import {Connector} from "../../utils/api/connectors"; +import {Button, Form, FormInstance, Input, Select, Space, Typography} from "antd"; +import React, {useState} from "react"; +import {Connector, ConnectorProvider} from "../../utils/api/connectors"; +import {t} from "ttag"; +import {BankOutlined} from "@ant-design/icons"; +import {regionNames} from "../../i18n"; + +const formItemLayoutWithOutLabel = { + wrapperCol: { + xs: {span: 24, offset: 0}, + sm: {span: 20, offset: 4}, + }, +}; export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate: (values: Connector) => void }) { - return <> - + const [provider, setProvider] = useState() + + const ovhFields = { + appKey: t`Application key`, + appSecret: t`Application secret`, + consumerKey: t`Consumer key` + } + + const ovhEndpointList = [ + { + label: t`European Region`, + value: 'ovh-eu' + } + ] + + const ovhSubsidiaryList = [{value: 'EU', label: t`Europa`}, ...[ + 'CZ', 'DE', 'ES', 'FI', 'FR', 'GB', 'IE', 'IT', 'LT', 'MA', 'NL', 'PL', 'PT', 'SN', 'TN' + ].map(c => ({value: c, label: regionNames.of(c) ?? c}))] + + const ovhPricingMode = [ + {value: 'create-default', label: t`The domain is free and at the standard price`}, + { + value: 'create-premium', + label: t`The domain is free but is a premium. Its price varies from one domain to another` + } + ] + + return
+ + + ) + } + + + + + + + optionFilterProp="label" value={actionsSelect[field.key]} + onChange={(e) => setActionsSelect({...actionsSelect, [field.key]: e})}/> + {actionsSelect[field.key] === 'buy' && +