1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { InjectedFormProps, Field } from 'redux-form';
7 import { WithDialogProps } from '~/store/dialog/with-dialog';
8 import { CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions';
9 import { FormDialog } from '~/components/form-dialog/form-dialog';
10 import { CollectionNameField, CollectionDescriptionField } from '~/views-components/form-fields/collection-form-fields';
11 import { require } from '~/validators/require';
12 import { FileUploaderField } from '../file-uploader/file-uploader';
15 type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
17 export const DialogCollectionCreate = (props: DialogCollectionProps) =>
19 dialogTitle='New collection'
20 formFields={CollectionAddFields}
21 submitLabel='Create a Collection'
25 const CollectionAddFields = () => <span>
26 <CollectionNameField />
27 <CollectionDescriptionField />
32 component={FileUploaderField} />