X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/35df2cdddc36985bdca21547d7c12332ea032b1c..ffac6f1051efb642db49c4c4a5d2f3f477ca6d34:/src/views-components/dialog-create/dialog-project-create.tsx diff --git a/src/views-components/dialog-create/dialog-project-create.tsx b/src/views-components/dialog-create/dialog-project-create.tsx index 8c690c09..592efc1a 100644 --- a/src/views-components/dialog-create/dialog-project-create.tsx +++ b/src/views-components/dialog-create/dialog-project-create.tsx @@ -12,7 +12,7 @@ import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; import { Button, StyleRulesCallback, WithStyles, withStyles, CircularProgress } from '@material-ui/core'; -import { NAME, DESCRIPTION } from '../../validators/create-project/create-project-validator'; +import { PROJECT_NAME_VALIDATION, PROJECT_DESCRIPTION_VALIDATION } from '../../validators/create-project/create-project-validator'; type CssRules = "button" | "lastButton" | "formContainer" | "textField" | "dialog" | "dialogTitle" | "createProgress" | "dialogActions"; @@ -64,64 +64,65 @@ interface TextFieldProps { meta?: any; } -class DialogProjectCreate extends React.Component> { - render() { - const { classes, open, handleClose, handleSubmit, onSubmit, submitting } = this.props; - - return ( - -
-
onSubmit(data))}> - Create a project - - - - - - - - {submitting && } - -
-
-
- ); - } +export const DialogProjectCreate = compose( + reduxForm({ form: 'projectCreateDialog' }), + withStyles(styles))( + class DialogProjectCreate extends React.Component> { + render() { + const { classes, open, handleClose, handleSubmit, onSubmit, submitting } = this.props; - renderTextField = ({ input, label, meta: { touched, error }, ...custom }: TextFieldProps) => ( - - ) -} + return ( + +
+
onSubmit(data))}> + Create a + project + + + + + + + + {submitting && } + +
+
+
+ ); + } -export default compose( - reduxForm({ form: 'projectCreateDialog' }), - withStyles(styles) -)(DialogProjectCreate); + renderTextField = ({ input, label, meta: { touched, error }, ...custom }: TextFieldProps) => ( + + ) + } +);