18219: Unifies collection/project create/update properties handling actions.
[arvados-workbench2.git] / src / views-components / collection-properties / update-collection-properties-form.tsx
index dc00de30f32683cf3ea2b8d4d9cbae232f24537f..13a29ad4b679a9561af978fe01bb947770cb335c 100644 (file)
@@ -5,13 +5,13 @@
 import { reduxForm, reset } from 'redux-form';
 import { withStyles } from '@material-ui/core';
 import {
-    addPropertyToUpdateCollectionForm,
     COLLECTION_UPDATE_PROPERTIES_FORM_NAME
 } from 'store/collections/collection-update-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 +26,7 @@ const Form = withStyles(
 export const UpdateCollectionPropertiesForm = reduxForm<ResourcePropertiesFormData>({
     form: COLLECTION_UPDATE_PROPERTIES_FORM_NAME,
     onSubmit: (data, dispatch) => {
-        dispatch(addPropertyToUpdateCollectionForm(data));
+        dispatch(addPropertyToResourceForm(data, COLLECTION_UPDATE_PROPERTIES_FORM_NAME));
         dispatch(reset(COLLECTION_UPDATE_PROPERTIES_FORM_NAME));
     }
 })(Form);
\ No newline at end of file