domain-watchdog/assets/utils/providers/forms/AutoDnsConnectorForm.tsx

80 lines
3.2 KiB
TypeScript
Raw Permalink Normal View History

2025-02-18 15:41:59 +01:00
import {Alert, Checkbox, Form, Input, Typography} from 'antd'
import React from 'react'
import {t} from 'ttag'
2025-03-04 19:11:24 +01:00
import {LockOutlined, UserOutlined, CrownOutlined, FieldNumberOutlined} from "@ant-design/icons"
2025-02-18 15:41:59 +01:00
2025-02-20 16:32:25 +01:00
export default function AutoDnsConnectorForm() {
2025-02-18 15:41:59 +01:00
return (
2025-02-19 22:21:20 +01:00
<>
2025-02-18 15:41:59 +01:00
<Alert
message={t`This provider does not provide a list of supported TLD. Please double check if the domain you want to register is supported.`}
type='warning'
style={{marginBottom: '2em'}}
/>
<Form.Item
label={t`AutoDNS Username`}
name={['authData', 'username']}
2025-02-19 00:54:04 +01:00
help={<Typography.Link target='_blank' href='https://en.autodns.com/domain-robot-api/'>
{t`Because of some limitations in API of AutoDNS, we suggest to create an dedicated user for API with limited rights`}
</Typography.Link>}
2025-02-18 15:41:59 +01:00
rules={[{required: true, message: t`Required`}]}
>
2025-03-04 19:11:24 +01:00
<Input prefix={<UserOutlined/>} autoComplete='off' required/>
2025-02-18 15:41:59 +01:00
</Form.Item>
<Form.Item
label={t`AutoDNS Password`}
name={['authData', 'password']}
2025-02-19 00:54:04 +01:00
help={<Typography.Text
type='secondary'
>{t`Attention: AutoDNS do not support 2-Factor Authentication on API Users for automated systems`}
</Typography.Text>}
2025-02-18 15:41:59 +01:00
rules={[{required: true, message: t`Required`}]}
required
>
2025-03-04 19:11:24 +01:00
<Input.Password prefix={<LockOutlined/>} autoComplete='off' required placeholder=''/>
2025-02-18 15:41:59 +01:00
</Form.Item>
<Form.Item
label={t`Owner nic-handle`}
name={['authData', 'contactid']}
help={<Typography.Text
type='secondary'
2025-02-19 00:54:04 +01:00
>{t`The nic-handle of the domain name owner`} <a
2025-02-18 15:41:59 +01:00
href='https://cloud.autodns.com/contacts/domain'
>{t`You can get it from this page`}
</a>
</Typography.Text>}
rules={[{required: true, message: t`Required`}]}
required
>
2025-03-04 19:11:24 +01:00
<Input prefix={<CrownOutlined />} autoComplete='off' required/>
2025-02-18 15:41:59 +01:00
</Form.Item>
<Form.Item
label={t`Context Value`}
name={['authData', 'context']}
help={<Typography.Text
type='secondary'
>{t`If you not sure, use the default value 4`}
</Typography.Text>}
required={false}
2025-03-04 19:11:24 +01:00
initialValue={4}
2025-02-18 15:41:59 +01:00
>
2025-03-04 19:11:24 +01:00
<Input prefix={<FieldNumberOutlined />} autoComplete='off' required={false}/>
2025-02-18 15:41:59 +01:00
</Form.Item>
<Form.Item
valuePropName='checked'
label={t`Owner confirmation`}
name={['authData', 'ownerConfirm']}
rules={[{required: true, message: t`Required`}]}
>
<Checkbox
required
>{t`Owner confirms his consent of domain order jobs`}
</Checkbox>
</Form.Item>
2025-02-19 22:21:20 +01:00
</>
2025-02-18 15:41:59 +01:00
)
}