16439: Merge branch 'master' into 16439-objects-creation-placement-fix
[arvados-workbench2.git] / src / views-components / dialog-update / dialog-collection-update.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 { CollectionUpdateFormDialogData } from '~/store/collections/collection-update-actions';
9 import { FormDialog } from '~/components/form-dialog/form-dialog';
10 import { CollectionNameField, CollectionDescriptionField } from '~/views-components/form-fields/collection-form-fields';
11
12 type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionUpdateFormDialogData>;
13
14 export const DialogCollectionUpdate = (props: DialogCollectionProps) =>
15     <FormDialog
16         dialogTitle='Edit Collection'
17         formFields={CollectionEditFields}
18         submitLabel='Save'
19         {...props}
20     />;
21
22 const CollectionEditFields = () => <span>
23     <CollectionNameField />
24     <CollectionDescriptionField />
25 </span>;