mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: ovh api conditions checkbox
This commit is contained in:
@@ -40,6 +40,28 @@ export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate:
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const helpGetTokenLink = (provider?: string) => {
|
||||||
|
switch (provider) {
|
||||||
|
case ConnectorProvider.OVH:
|
||||||
|
return <Typography.Link target='_blank'
|
||||||
|
href="https://api.ovh.com/createToken/index.cgi?GET=/order/cart/*&POST=/order/cart&POST=/order/cart/*&DELETE=/order/cart/*">
|
||||||
|
{t`Retrieve a set of tokens from your OVH account`}
|
||||||
|
</Typography.Link>
|
||||||
|
default:
|
||||||
|
return <></>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const tosHyperlink = (provider?: string) => {
|
||||||
|
switch (provider) {
|
||||||
|
case ConnectorProvider.OVH:
|
||||||
|
return 'https://storage.gra.cloud.ovh.net/v1/AUTH_325716a587c64897acbef9a4a4726e38/contracts/9973515-contrat_genServices-FR-15.1.pdf'
|
||||||
|
default:
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return <Form
|
return <Form
|
||||||
{...formItemLayoutWithOutLabel}
|
{...formItemLayoutWithOutLabel}
|
||||||
form={form}
|
form={form}
|
||||||
@@ -51,6 +73,7 @@ export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate:
|
|||||||
<Form.Item
|
<Form.Item
|
||||||
label={t`Provider`}
|
label={t`Provider`}
|
||||||
name="provider"
|
name="provider"
|
||||||
|
help={helpGetTokenLink(provider)}
|
||||||
rules={[{required: true, message: t`Required`}]}
|
rules={[{required: true, message: t`Required`}]}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
@@ -71,10 +94,6 @@ export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate:
|
|||||||
|
|
||||||
{
|
{
|
||||||
provider === ConnectorProvider.OVH && <>
|
provider === ConnectorProvider.OVH && <>
|
||||||
<Typography.Link target='_blank'
|
|
||||||
href="https://api.ovh.com/createToken/index.cgi?GET=/order/cart/*&POST=/order/cart&POST=/order/cart/*&DELETE=/order/cart/*">
|
|
||||||
{t`Retrieve a set of tokens from the provider's website`}
|
|
||||||
</Typography.Link>
|
|
||||||
{
|
{
|
||||||
Object.keys(ovhFields).map(fieldName => <Form.Item
|
Object.keys(ovhFields).map(fieldName => <Form.Item
|
||||||
label={ovhFields[fieldName as keyof typeof ovhFields]}
|
label={ovhFields[fieldName as keyof typeof ovhFields]}
|
||||||
@@ -108,12 +127,16 @@ export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate:
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
label={t`TOS`}
|
label={t`API Terms of Service`}
|
||||||
name={['authData', 'acceptConditions']}
|
name={['authData', 'acceptConditions']}
|
||||||
rules={[{required: true, message: t`Required`}]}
|
rules={[{required: true, message: t`Required`}]}
|
||||||
>
|
>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
required={true}>{t`I accept the terms of use of the OVH provider API and those of Domain Watchdog`}</Checkbox>
|
required={true}>
|
||||||
|
<Typography.Link target='_blank' href={tosHyperlink(provider)}>
|
||||||
|
{t`I certify that I have read and accepted the conditions of use of the Provider API, accessible from this hyperlink`}
|
||||||
|
</Typography.Link>
|
||||||
|
</Checkbox>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
@@ -131,7 +154,7 @@ export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate:
|
|||||||
rules={[{required: true, message: t`Required`}]}
|
rules={[{required: true, message: t`Required`}]}
|
||||||
>
|
>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
required={true}>{t`I expressly waive my right of withdrawal concerning the purchase of domain names via the OVH API`}</Checkbox>
|
required={true}>{t`I expressly waive my right of withdrawal regarding the purchase of domain names via the Provider's API.`}</Checkbox>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,14 +48,14 @@ msgid "ENUM validation expiration"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/search/DomainSearchBar.tsx:23
|
#: assets/components/search/DomainSearchBar.tsx:23
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:54
|
#: assets/components/tracking/ConnectorForm.tsx:77
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:82
|
#: assets/components/tracking/ConnectorForm.tsx:101
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:90
|
#: assets/components/tracking/ConnectorForm.tsx:109
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:97
|
#: assets/components/tracking/ConnectorForm.tsx:116
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:105
|
#: assets/components/tracking/ConnectorForm.tsx:124
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:113
|
#: assets/components/tracking/ConnectorForm.tsx:132
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:122
|
#: assets/components/tracking/ConnectorForm.tsx:145
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:131
|
#: assets/components/tracking/ConnectorForm.tsx:154
|
||||||
#: assets/components/tracking/WatchlistForm.tsx:115
|
#: assets/components/tracking/WatchlistForm.tsx:115
|
||||||
#: assets/components/tracking/WatchlistForm.tsx:174
|
#: assets/components/tracking/WatchlistForm.tsx:174
|
||||||
#: assets/components/tracking/WatchlistForm.tsx:184
|
#: assets/components/tracking/WatchlistForm.tsx:184
|
||||||
@@ -199,12 +199,12 @@ msgstr ""
|
|||||||
msgid "Add a Trigger"
|
msgid "Add a Trigger"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:143
|
#: assets/components/tracking/ConnectorForm.tsx:166
|
||||||
#: assets/components/tracking/WatchlistForm.tsx:237
|
#: assets/components/tracking/WatchlistForm.tsx:237
|
||||||
msgid "Create"
|
msgid "Create"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:146
|
#: assets/components/tracking/ConnectorForm.tsx:169
|
||||||
#: assets/components/tracking/WatchlistForm.tsx:240
|
#: assets/components/tracking/WatchlistForm.tsx:240
|
||||||
msgid "Reset"
|
msgid "Reset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -239,60 +239,59 @@ msgid ""
|
|||||||
"another"
|
"another"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:52
|
#: assets/components/tracking/ConnectorForm.tsx:48
|
||||||
|
msgid "Retrieve a set of tokens from your OVH account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: assets/components/tracking/ConnectorForm.tsx:74
|
||||||
#: assets/components/tracking/ConnectorsList.tsx:21
|
#: assets/components/tracking/ConnectorsList.tsx:21
|
||||||
msgid "Provider"
|
msgid "Provider"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:57
|
#: assets/components/tracking/ConnectorForm.tsx:80
|
||||||
msgid "Please select a Provider"
|
msgid "Please select a Provider"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:76
|
#: assets/components/tracking/ConnectorForm.tsx:107
|
||||||
msgid "Retrieve a set of tokens from the provider's website"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:88
|
|
||||||
msgid "OVH Endpoint"
|
msgid "OVH Endpoint"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:95
|
#: assets/components/tracking/ConnectorForm.tsx:114
|
||||||
msgid "OVH subsidiary"
|
msgid "OVH subsidiary"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:103
|
#: assets/components/tracking/ConnectorForm.tsx:122
|
||||||
msgid "OVH pricing mode"
|
msgid "OVH pricing mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/App.tsx:164
|
#: assets/components/tracking/ConnectorForm.tsx:130
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:111
|
msgid "API Terms of Service"
|
||||||
msgid "TOS"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:116
|
#: assets/components/tracking/ConnectorForm.tsx:137
|
||||||
msgid ""
|
msgid ""
|
||||||
"I accept the terms of use of the OVH provider API and those of Domain "
|
"I certify that I have read and accepted the conditions of use of the "
|
||||||
"Watchdog"
|
"Provider API, accessible from this hyperlink"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:120
|
#: assets/components/tracking/ConnectorForm.tsx:143
|
||||||
msgid "Legal age"
|
msgid "Legal age"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:125
|
#: assets/components/tracking/ConnectorForm.tsx:148
|
||||||
msgid ""
|
msgid ""
|
||||||
"I certify on my honor that I am of the minimum age required to consent to "
|
"I certify on my honor that I am of the minimum age required to consent to "
|
||||||
"these conditions"
|
"these conditions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:129
|
#: assets/components/tracking/ConnectorForm.tsx:152
|
||||||
msgid "Withdrawal period"
|
msgid "Withdrawal period"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/ConnectorForm.tsx:134
|
#: assets/components/tracking/ConnectorForm.tsx:157
|
||||||
msgid ""
|
msgid ""
|
||||||
"I expressly waive my right of withdrawal concerning the purchase of domain "
|
"I expressly waive my right of withdrawal regarding the purchase of domain "
|
||||||
"names via the OVH API"
|
"names via the Provider's API."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/tracking/WatchlistsList.tsx:14
|
#: assets/components/tracking/WatchlistsList.tsx:14
|
||||||
@@ -563,6 +562,10 @@ msgstr ""
|
|||||||
msgid "My Watchdog"
|
msgid "My Watchdog"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: assets/App.tsx:164
|
||||||
|
msgid "TOS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: assets/App.tsx:170
|
#: assets/App.tsx:170
|
||||||
msgid "Privacy Policy"
|
msgid "Privacy Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
Reference in New Issue
Block a user