1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

hack in terms link, copy change

This commit is contained in:
Matthias Kretschmann 2021-11-25 14:36:01 +00:00
parent b64e4ff5dc
commit 0a9f9ec693
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 19 additions and 2 deletions

View File

@ -75,7 +75,7 @@
"name": "termsAndConditions", "name": "termsAndConditions",
"label": "Terms & Conditions", "label": "Terms & Conditions",
"type": "checkbox", "type": "checkbox",
"options": ["I agree to these Terms and Conditions"], "options": ["I agree to the Terms and Conditions"],
"required": true "required": true
} }
] ]

View File

@ -0,0 +1,6 @@
.termsLink {
position: relative;
font-size: var(--font-size-small);
margin-left: 1.75rem;
top: -3.2rem;
}

View File

@ -7,6 +7,7 @@ import { FormPublishData } from '../_types'
import { getFieldContent } from '../_utils' import { getFieldContent } from '../_utils'
import IconDataset from '@images/dataset.svg' import IconDataset from '@images/dataset.svg'
import IconAlgorithm from '@images/algorithm.svg' import IconAlgorithm from '@images/algorithm.svg'
import styles from './index.module.css'
const assetTypeOptionsTitles = getFieldContent( const assetTypeOptionsTitles = getFieldContent(
'type', 'type',
@ -123,6 +124,14 @@ export default function MetadataFields(): ReactElement {
component={Input} component={Input}
name="metadata.termsAndConditions" name="metadata.termsAndConditions"
/> />
<a
className={styles.termsLink}
href="/terms"
rel="noopener noreferrer"
target="_blank"
>
View Terms and Conditions
</a>
</> </>
) )
} }

View File

@ -15,7 +15,9 @@ const validationMetadata = {
.required('Required'), .required('Required'),
author: Yup.string().required('Required'), author: Yup.string().required('Required'),
tags: Yup.string().nullable(), tags: Yup.string().nullable(),
termsAndConditions: Yup.boolean().required('Required').isTrue() termsAndConditions: Yup.boolean()
.required('Required')
.isTrue('Please agree to the Terms and Conditions.')
} }
const validationService = { const validationService = {