17526: Rename supportsWebdav to isCollection
[arvados.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 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 {
11     CollectionNameField,
12     CollectionDescriptionField,
13     CollectionStorageClassesField
14 } from 'views-components/form-fields/collection-form-fields';
15
16 type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionUpdateFormDialogData>;
17
18 export const DialogCollectionUpdate = (props: DialogCollectionProps) =>
19     <FormDialog
20         dialogTitle='Edit Collection'
21         formFields={CollectionEditFields}
22         submitLabel='Save'
23         {...props}
24     />;
25
26 const CollectionEditFields = () => <span>
27     <CollectionNameField />
28     <CollectionDescriptionField />
29     <CollectionStorageClassesField />
30 </span>;