Merge remote-tracking branch 'origin/main' into 18207-Workbench2-is-not-clearing...
[arvados-workbench2.git] / src / views-components / project-properties / create-project-properties-form.tsx
index c49d738a53d503658114b22acc39c6f7247371aa..8c26523e8e79327ef0f53ac1bbe829e765031e20 100644 (file)
@@ -6,18 +6,18 @@ import { reduxForm, reset } from 'redux-form';
 import { withStyles } from '@material-ui/core';
 import {
     PROJECT_CREATE_PROPERTIES_FORM_NAME,
-    addPropertyToCreateProjectForm
+    PROJECT_CREATE_FORM_NAME
 } from 'store/projects/project-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 }) => (
         { container:
             {
-                paddingTop: spacing.unit,
                 margin: 0,
             }
         })
@@ -26,7 +26,7 @@ const Form = withStyles(
 export const CreateProjectPropertiesForm = reduxForm<ResourcePropertiesFormData>({
     form: PROJECT_CREATE_PROPERTIES_FORM_NAME,
     onSubmit: (data, dispatch) => {
-        dispatch(addPropertyToCreateProjectForm(data));
+        dispatch(addPropertyToResourceForm(data, PROJECT_CREATE_FORM_NAME));
         dispatch(reset(PROJECT_CREATE_PROPERTIES_FORM_NAME));
     }
 })(Form);
\ No newline at end of file