X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/efcea950b84b26c4cbbdf4df8fd5c88f6c846da9..4c34de655fc7f8839b205b48f460a168f302dd63:/src/views-components/form-fields/collection-form-fields.tsx
diff --git a/src/views-components/form-fields/collection-form-fields.tsx b/src/views-components/form-fields/collection-form-fields.tsx
index 623cb31782..7d5fcf8035 100644
--- a/src/views-components/form-fields/collection-form-fields.tsx
+++ b/src/views-components/form-fields/collection-form-fields.tsx
@@ -2,17 +2,20 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import * as React from "react";
+import React from "react";
import { Field, Validator } from "redux-form";
-import { TextField } from "~/components/text-field/text-field";
+import { TextField } from "components/text-field/text-field";
import {
COLLECTION_NAME_VALIDATION, COLLECTION_NAME_VALIDATION_ALLOW_SLASH,
COLLECTION_DESCRIPTION_VALIDATION, COLLECTION_PROJECT_VALIDATION
-} from "~/validators/validators";
-import { ProjectTreePickerField, CollectionTreePickerField } from "~/views-components/projects-tree-picker/tree-picker-field";
-import { PickerIdProp } from '~/store/tree-picker/picker-id';
+} from "validators/validators";
+import { ProjectTreePickerField, CollectionTreePickerField, DirectoryTreePickerField } from "views-components/projects-tree-picker/tree-picker-field";
+import { PickerIdProp } from 'store/tree-picker/picker-id';
import { connect } from "react-redux";
-import { RootState } from "~/store/store";
+import { RootState } from "store/store";
+import { MultiCheckboxField } from "components/checkbox-field/checkbox-field";
+import { getStorageClasses } from "common/config";
+import { ERROR_MESSAGE } from "validators/require";
interface CollectionNameFieldProps {
validate: Validator[];
@@ -29,7 +32,7 @@ export const CollectionNameField = connect(
})((props: CollectionNameFieldProps) =>
@@ -38,7 +41,7 @@ export const CollectionNameField = connect(
export const CollectionDescriptionField = () =>
;
@@ -55,3 +58,34 @@ export const CollectionPickerField = (props: PickerIdProp) =>
pickerId={props.pickerId}
component={CollectionTreePickerField}
validate={COLLECTION_PROJECT_VALIDATION} />;
+
+const validateDirectory = (val) => (val && val.uuid ? undefined : ERROR_MESSAGE);
+
+export const DirectoryPickerField = (props: PickerIdProp) =>
+ ;
+
+interface StorageClassesProps {
+ items: string[];
+ defaultClasses?: string[];
+}
+
+export const CollectionStorageClassesField = connect(
+ (state: RootState) => {
+ return {
+ items: getStorageClasses(state.auth.config)
+ };
+ })(
+ (props: StorageClassesProps) =>
+ );