Merge branch 'master' into 14277-search-view-editing-saved-queries
[arvados.git] / src / views-components / dialog-create / dialog-project-create.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import { InjectedFormProps } from 'redux-form';
7 import { WithDialogProps } from '~/store/dialog/with-dialog';
8 import { ProjectCreateFormDialogData } from '~/store/projects/project-create-actions';
9 import { FormDialog } from '~/components/form-dialog/form-dialog';
10 import { ProjectNameField, ProjectDescriptionField } from '~/views-components/form-fields/project-form-fields';
11
12 type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<ProjectCreateFormDialogData>;
13
14 export const DialogProjectCreate = (props: DialogCollectionProps) =>
15     <FormDialog
16         dialogTitle='New project'
17         formFields={ProjectAddFields}
18         submitLabel='Create a Project'
19         {...props}
20     />;
21
22 const ProjectAddFields = () => <span>
23     <ProjectNameField />
24     <ProjectDescriptionField />
25 </span>;