X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7486a3262490a384017ee6c826a408a017a79f55..e6e51406134e71d493f5258917915136709bcda2:/src/views-components/dialog-forms/copy-collection-dialog.ts diff --git a/src/views-components/dialog-forms/copy-collection-dialog.ts b/src/views-components/dialog-forms/copy-collection-dialog.ts index 41309fdff6..220b5a2c4d 100644 --- a/src/views-components/dialog-forms/copy-collection-dialog.ts +++ b/src/views-components/dialog-forms/copy-collection-dialog.ts @@ -3,19 +3,34 @@ // SPDX-License-Identifier: AGPL-3.0 import { compose } from "redux"; -import { withDialog } from "~/store/dialog/with-dialog"; -import { reduxForm } from 'redux-form'; -import { COLLECTION_COPY_FORM_NAME } from '~/store/collections/collection-copy-actions'; -import { DialogCopy } from "~/views-components/dialog-copy/dialog-copy"; -import { copyCollection } from '~/store/workbench/workbench-actions'; -import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog'; +import { withDialog } from "store/dialog/with-dialog"; +import { reduxForm } from "redux-form"; +import { COLLECTION_COPY_FORM_NAME, COLLECTION_MULTI_COPY_FORM_NAME } from "store/collections/collection-copy-actions"; +import { DialogCopy, DialogMultiCopy } from "views-components/dialog-copy/dialog-copy"; +import { copyCollection } from "store/workbench/workbench-actions"; +import { CopyFormDialogData } from "store/copy-dialog/copy-dialog"; +import { pickerId } from "store/tree-picker/picker-id"; export const CopyCollectionDialog = compose( withDialog(COLLECTION_COPY_FORM_NAME), reduxForm({ form: COLLECTION_COPY_FORM_NAME, + touchOnChange: true, onSubmit: (data, dispatch) => { dispatch(copyCollection(data)); - } - }) -)(DialogCopy); \ No newline at end of file + }, + }), + pickerId(COLLECTION_COPY_FORM_NAME) +)(DialogCopy); + +export const CopyMultiCollectionDialog = compose( + withDialog(COLLECTION_MULTI_COPY_FORM_NAME), + reduxForm({ + form: COLLECTION_MULTI_COPY_FORM_NAME, + touchOnChange: true, + onSubmit: (data, dispatch) => { + dispatch(copyCollection(data)); + }, + }), + pickerId(COLLECTION_MULTI_COPY_FORM_NAME) +)(DialogMultiCopy);