1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from "react";
6 import { InjectedFormProps, Field } from "redux-form";
7 import { Dialog, DialogTitle, DialogContent, DialogActions, Button, DialogContentText, CircularProgress } from "@material-ui/core";
8 import { WithDialogProps } from "~/store/dialog/with-dialog";
9 import { TextField } from "../text-field/text-field";
11 export const RenameDialog = (props: WithDialogProps<string> & InjectedFormProps<{ name: string }>) =>
13 <Dialog open={props.open}>
14 <DialogTitle>{`Rename`}</DialogTitle>
17 {`Please, enter a new name for ${props.data}`}
28 disabled={props.submitting}
29 onClick={props.closeDialog}>
36 onClick={props.handleSubmit}
37 disabled={props.pristine || props.invalid || props.submitting}>
39 ? <CircularProgress size={20} />