17305: Added handling for non collection file size display
[arvados.git] / src / views-components / project-properties / create-project-properties-form.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { reduxForm, reset } from 'redux-form';
6 import { withStyles } from '@material-ui/core';
7 import {
8     PROJECT_CREATE_PROPERTIES_FORM_NAME,
9     addPropertyToCreateProjectForm
10 } from '~/store/projects/project-create-actions';
11 import {
12     ResourcePropertiesForm,
13     ResourcePropertiesFormData
14 } from '~/views-components/resource-properties-form/resource-properties-form';
15
16 const Form = withStyles(
17     ({ spacing }) => (
18         { container:
19             {
20                 paddingTop: spacing.unit,
21                 margin: 0,
22             }
23         })
24     )(ResourcePropertiesForm);
25
26 export const CreateProjectPropertiesForm = reduxForm<ResourcePropertiesFormData>({
27     form: PROJECT_CREATE_PROPERTIES_FORM_NAME,
28     onSubmit: (data, dispatch) => {
29         dispatch(addPropertyToCreateProjectForm(data));
30         dispatch(reset(PROJECT_CREATE_PROPERTIES_FORM_NAME));
31     }
32 })(Form);