X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/2bd3f83db9934198b658b7035a7be65017b754d9..5c7b87f62d045b50e177f788ecdb907ab5402ad7:/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 eb1f2615..220b5a2c 100644 --- a/src/views-components/dialog-forms/copy-collection-dialog.ts +++ b/src/views-components/dialog-forms/copy-collection-dialog.ts @@ -5,8 +5,8 @@ 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 { 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"; @@ -22,3 +22,15 @@ export const CopyCollectionDialog = compose( }), 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);