diff --git a/content/publish/form.json b/content/publish/form.json
index 316eecde9..dc14d284b 100644
--- a/content/publish/form.json
+++ b/content/publish/form.json
@@ -31,7 +31,7 @@
{
"name": "termsAndConditions",
"label": "Terms & Conditions",
- "type": "terms",
+ "type": "checkbox",
"options": ["I agree to these Terms and Conditions"],
"required": true
}
@@ -40,6 +40,20 @@
"services": {
"title": "Access",
"fields": [
+ {
+ "name": "type",
+ "label": "Asset Type",
+ "type": "boxSelection",
+ "options": ["Dataset", "Algorithm"],
+ "required": true
+ },
+ {
+ "name": "dataTokenOptions",
+ "label": "Datatoken Name & Symbol",
+ "type": "datatoken",
+ "help": "The datatoken for this data set will be created with this name & symbol.",
+ "required": true
+ },
{
"name": "dataTokenOptions",
"label": "Datatoken Name & Symbol",
@@ -95,8 +109,11 @@
"title": "Pricing",
"fields": [
{
- "name": "dummy content, as content is defined under 'create' key in ../price.json"
+ "name": "dummy content, actual content is defined under 'create' key in ../price.json"
}
]
+ },
+ "preview": {
+ "title": "Preview"
}
}
diff --git a/src/components/@shared/Form/FormFields/BoxSelection.tsx b/src/components/@shared/Form/FormFields/BoxSelection.tsx
index f1935cf8d..7cab79509 100644
--- a/src/components/@shared/Form/FormFields/BoxSelection.tsx
+++ b/src/components/@shared/Form/FormFields/BoxSelection.tsx
@@ -40,27 +40,27 @@ export default function BoxSelection({
{!options ? (
) : (
- options.map((value: BoxSelectionOption) => (
-
+ options.map((option: BoxSelectionOption) => (
+
handleChange(event)}
+ defaultChecked={option.checked}
+ onChange={(event) => handleChange(event)}
{...props}
disabled={disabled}
- value={value.name}
+ value={option.name}
name={name}
/>
))
diff --git a/src/components/@shared/Form/FormFields/Terms.module.css b/src/components/@shared/Form/FormFields/Terms.module.css
deleted file mode 100644
index ffadc2c19..000000000
--- a/src/components/@shared/Form/FormFields/Terms.module.css
+++ /dev/null
@@ -1,25 +0,0 @@
-.terms {
- composes: content from '@shared/Page/PageMarkdown.module.css';
-
- padding: calc(var(--spacer) / 2);
- border: 1px solid var(--border-color);
- background-color: var(--background-highlight);
- border-radius: var(--border-radius);
- margin-bottom: calc(var(--spacer) / 2);
- font-size: var(--font-size-small);
-
- max-height: 250px;
- /* smooth overflow scrolling for pre-iOS 13 */
- overflow: auto;
- -webkit-overflow-scrolling: touch;
-}
-
-.terms h1 {
- font-size: var(--font-size-base);
- margin-bottom: calc(var(--spacer) / 2);
-}
-
-.terms h2 {
- font-size: var(--font-size-small);
- margin-bottom: calc(var(--spacer) / 2);
-}
diff --git a/src/components/@shared/Form/FormFields/Terms.tsx b/src/components/@shared/Form/FormFields/Terms.tsx
deleted file mode 100644
index 2a6d437da..000000000
--- a/src/components/@shared/Form/FormFields/Terms.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import React, { ReactElement } from 'react'
-import { InputProps } from '@shared/Form/Input'
-import InputElement from '@shared/Form/Input/InputElement'
-import styles from './Terms.module.css'
-
-export default function Terms(props: InputProps): ReactElement {
- const termsProps: InputProps = {
- ...props,
- defaultChecked: props.value?.toString() === 'true'
- }
-
- return (
- <>
-
- >
- )
-}
diff --git a/src/components/@shared/Form/Input/InputElement.tsx b/src/components/@shared/Form/Input/InputElement.tsx
index fbbb0d514..7f964f015 100644
--- a/src/components/@shared/Form/Input/InputElement.tsx
+++ b/src/components/@shared/Form/Input/InputElement.tsx
@@ -4,7 +4,6 @@ import styles from './InputElement.module.css'
import { InputProps } from '.'
import FilesInput from '../FormFields/FilesInput'
import CustomProvider from '../FormFields/CustomProvider'
-import Terms from '../FormFields/Terms'
import BoxSelection, { BoxSelectionOption } from '../FormFields/BoxSelection'
import Datatoken from '../FormFields/Datatoken'
import classNames from 'classnames/bind'
@@ -54,7 +53,9 @@ export default function InputElement({
const sortedOptions =
!sortOptions && sortOptions === false
? options
- : options.sort((a: string, b: string) => a.localeCompare(b))
+ : (options as string[]).sort((a: string, b: string) =>
+ a.localeCompare(b)
+ )
return (