X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/366a714c6d51fae8905c50d960555b4707305f42..a23cfd6defb8dab9ac9afe13034f7b667f07acca:/src/views-components/resource-properties-form/resource-properties-form.tsx diff --git a/src/views-components/resource-properties-form/resource-properties-form.tsx b/src/views-components/resource-properties-form/resource-properties-form.tsx index 2f3e0cd4d2..25d0f2bb37 100644 --- a/src/views-components/resource-properties-form/resource-properties-form.tsx +++ b/src/views-components/resource-properties-form/resource-properties-form.tsx @@ -2,29 +2,49 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; -import { InjectedFormProps, reduxForm } from 'redux-form'; -import { Grid, Button } from '@material-ui/core'; -import { PropertyKeyField, PROPERTY_KEY_FIELD_NAME } from './property-key-field'; -import { PropertyValueField, PROPERTY_VALUE_FIELD_NAME } from './property-value-field'; +import React from 'react'; +import { InjectedFormProps } from 'redux-form'; +import { Grid, withStyles, WithStyles } from '@material-ui/core'; +import { PropertyKeyField, PROPERTY_KEY_FIELD_NAME, PROPERTY_KEY_FIELD_ID } from './property-key-field'; +import { PropertyValueField, PROPERTY_VALUE_FIELD_NAME, PROPERTY_VALUE_FIELD_ID } from './property-value-field'; +import { ProgressButton } from 'components/progress-button/progress-button'; +import { GridClassKey } from '@material-ui/core/Grid'; export interface ResourcePropertiesFormData { + uuid: string; [PROPERTY_KEY_FIELD_NAME]: string; + [PROPERTY_KEY_FIELD_ID]: string; [PROPERTY_VALUE_FIELD_NAME]: string; + [PROPERTY_VALUE_FIELD_ID]: string; + clearPropertyKeyOnSelect?: boolean; } -export const ResourcePropertiesForm = reduxForm({ form: 'rpform' })( - ({ handleSubmit }: InjectedFormProps) => -
- - - - - - - - - - +export type ResourcePropertiesFormProps = {uuid: string; clearPropertyKeyOnSelect?: boolean } & InjectedFormProps & WithStyles; + +export const ResourcePropertiesForm = ({ handleSubmit, change, submitting, invalid, classes, uuid, clearPropertyKeyOnSelect }: ResourcePropertiesFormProps ) => { + change('uuid', uuid); // Sets the uuid field to the uuid of the resource. + return + + + + + + - ); + + + + + }; + +export const Button = withStyles(theme => ({ + root: { marginTop: theme.spacing.unit } +}))(ProgressButton);