diff --git a/content/publish/form.json b/content/publish/form.json index fde2ab998..8e8d9e5df 100644 --- a/content/publish/form.json +++ b/content/publish/form.json @@ -75,7 +75,7 @@ "name": "termsAndConditions", "label": "Terms & Conditions", "type": "checkbox", - "options": ["I agree to these Terms and Conditions"], + "options": ["I agree to the Terms and Conditions"], "required": true } ] diff --git a/src/components/Publish/Metadata/index.module.css b/src/components/Publish/Metadata/index.module.css new file mode 100644 index 000000000..ade467aad --- /dev/null +++ b/src/components/Publish/Metadata/index.module.css @@ -0,0 +1,6 @@ +.termsLink { + position: relative; + font-size: var(--font-size-small); + margin-left: 1.75rem; + top: -3.2rem; +} diff --git a/src/components/Publish/Metadata/index.tsx b/src/components/Publish/Metadata/index.tsx index acd35d57e..12fb7c465 100644 --- a/src/components/Publish/Metadata/index.tsx +++ b/src/components/Publish/Metadata/index.tsx @@ -7,6 +7,7 @@ import { FormPublishData } from '../_types' import { getFieldContent } from '../_utils' import IconDataset from '@images/dataset.svg' import IconAlgorithm from '@images/algorithm.svg' +import styles from './index.module.css' const assetTypeOptionsTitles = getFieldContent( 'type', @@ -123,6 +124,14 @@ export default function MetadataFields(): ReactElement { component={Input} name="metadata.termsAndConditions" /> + + View Terms and Conditions + ) } diff --git a/src/components/Publish/_validation.ts b/src/components/Publish/_validation.ts index 452f851cb..06035a4c1 100644 --- a/src/components/Publish/_validation.ts +++ b/src/components/Publish/_validation.ts @@ -15,7 +15,9 @@ const validationMetadata = { .required('Required'), author: Yup.string().required('Required'), 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 = {