diff --git a/frontend/src/components/dialog/create-file-dialog.js b/frontend/src/components/dialog/create-file-dialog.js index 0d7796fbd6..7432c8afb1 100644 --- a/frontend/src/components/dialog/create-file-dialog.js +++ b/frontend/src/components/dialog/create-file-dialog.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Col, FormText } from 'reactstrap'; +import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label } from 'reactstrap'; import { gettext } from '../../utils/constants'; const propTypes = { @@ -109,28 +109,26 @@ class CreateFile extends React.Component { {gettext('New File')}
- - - {this.state.parentPath} + + + {this.newInput = input;}} + value={this.state.childName} + onChange={this.handleChange} + /> - - - - {this.newInput = input;}} id="fileName" placeholder={gettext('newName')} value={this.state.childName} onChange={this.handleChange}/> - - - -
- + ); diff --git a/frontend/src/components/dialog/create-folder-dialog.js b/frontend/src/components/dialog/create-folder-dialog.js index 843d6866f0..85c609d761 100644 --- a/frontend/src/components/dialog/create-folder-dialog.js +++ b/frontend/src/components/dialog/create-folder-dialog.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Col, FormText } from 'reactstrap'; +import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label } from 'reactstrap'; import { gettext } from '../../utils/constants'; const propTypes = { @@ -58,21 +58,21 @@ class CreateForder extends React.Component { {gettext('New Folder')}
- - - {this.state.parentPath} - - - - - {this.newInput = input;}} id="fileName" placeholder={gettext('newName')} value={this.state.childName} onChange={this.handleChange}/> - + + + {this.newInput = input;}} + onKeyPress={this.handleKeyPress} + onChange={this.handleChange} + />
- + );