1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from "react";
6 import { compose } from "redux";
7 import { reduxForm, InjectedFormProps } from 'redux-form';
8 import { withDialog, WithDialogProps } from '~/store/dialog/with-dialog';
9 import { CollectionPartialCopyFields } from '../form-dialog/collection-form-dialog';
10 import { FormDialog } from '~/components/form-dialog/form-dialog';
11 import { COLLECTION_PARTIAL_COPY, doCollectionPartialCopy, CollectionPartialCopyFormData } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
13 export const CollectionPartialCopyDialog = compose(
14 withDialog(COLLECTION_PARTIAL_COPY),
16 form: COLLECTION_PARTIAL_COPY,
17 onSubmit: (data: CollectionPartialCopyFormData, dispatch) => {
18 dispatch(doCollectionPartialCopy(data));
20 }))((props: WithDialogProps<string> & InjectedFormProps<CollectionPartialCopyFormData>) =>
22 dialogTitle='Create a collection'
23 formFields={CollectionPartialCopyFields}
24 submitLabel='Create a collection'