18219: Unifies collection/project create/update properties handling actions.
[arvados-workbench2.git] / src / views-components / collection-properties / create-collection-properties-form.tsx
index 8e3f8eb8e2b37b0ea7095f78c7df60a8d3e55a1d..ab389ddcc4c5731fd0c2c6c3c5c8746b66293e37 100644 (file)
@@ -6,12 +6,13 @@ import { reduxForm, reset } from 'redux-form';
 import { withStyles } from '@material-ui/core';
 import {
     COLLECTION_CREATE_PROPERTIES_FORM_NAME,
-    addPropertyToCreateCollectionForm
+    COLLECTION_CREATE_FORM_NAME
 } from 'store/collections/collection-create-actions';
 import {
     ResourcePropertiesForm,
     ResourcePropertiesFormData
 } from 'views-components/resource-properties-form/resource-properties-form';
+import { addPropertyToResourceForm } from 'store/resources/resources-actions';
 
 const Form = withStyles(
     ({ spacing }) => (
@@ -26,7 +27,7 @@ const Form = withStyles(
 export const CreateCollectionPropertiesForm = reduxForm<ResourcePropertiesFormData>({
     form: COLLECTION_CREATE_PROPERTIES_FORM_NAME,
     onSubmit: (data, dispatch) => {
-        dispatch(addPropertyToCreateCollectionForm(data));
+        dispatch(addPropertyToResourceForm(data, COLLECTION_CREATE_FORM_NAME));
         dispatch(reset(COLLECTION_CREATE_PROPERTIES_FORM_NAME));
     }
 })(Form);
\ No newline at end of file