mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 02:10:24 +00:00
Merge pull request #2650 from haiwen/new-dialog-improve
adjust new dialog style
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
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';
|
import { gettext } from '../../utils/constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -109,28 +109,26 @@ class CreateFile extends React.Component {
|
|||||||
<ModalHeader toggle={this.toggle}>{gettext('New File')}</ModalHeader>
|
<ModalHeader toggle={this.toggle}>{gettext('New File')}</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Form>
|
<Form>
|
||||||
<FormGroup row>
|
<FormGroup>
|
||||||
<Label sm={3}>Parent path: </Label>
|
<Label for="fileName">{gettext('Name')}</Label>
|
||||||
<Col sm={9} className="parent-path"><FormText>{this.state.parentPath}</FormText></Col>
|
<Input
|
||||||
|
id="fileName"
|
||||||
|
onKeyPress={this.handleKeyPress}
|
||||||
|
innerRef={input => {this.newInput = input;}}
|
||||||
|
value={this.state.childName}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup row>
|
<FormGroup check>
|
||||||
<Label for="fileName" sm={3}>{gettext('Name')}: </Label>
|
<Label check>
|
||||||
<Col sm={9}>
|
|
||||||
<Input onKeyPress={this.handleKeyPress} innerRef={input => {this.newInput = input;}} id="fileName" placeholder={gettext('newName')} value={this.state.childName} onChange={this.handleChange}/>
|
|
||||||
</Col>
|
|
||||||
</FormGroup>
|
|
||||||
<FormGroup row>
|
|
||||||
<Label sm={3} check />
|
|
||||||
<Col sm={9}>
|
|
||||||
<Input type="checkbox" onChange={this.handleCheck}/>{' '}{gettext('This is a draft.')}
|
<Input type="checkbox" onChange={this.handleCheck}/>{' '}{gettext('This is a draft.')}
|
||||||
</Col>
|
</Label>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
</Form>
|
</Form>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
|
||||||
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>
|
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>
|
||||||
|
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
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';
|
import { gettext } from '../../utils/constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -58,21 +58,21 @@ class CreateForder extends React.Component {
|
|||||||
<ModalHeader toggle={this.toggle}>{gettext('New Folder')}</ModalHeader>
|
<ModalHeader toggle={this.toggle}>{gettext('New Folder')}</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Form>
|
<Form>
|
||||||
<FormGroup row>
|
<FormGroup>
|
||||||
<Label sm={3}>Parent path: </Label>
|
<Label for="folderName">{gettext('Name')}</Label>
|
||||||
<Col sm={9} className="parent-path"><FormText>{this.state.parentPath}</FormText></Col>
|
<Input
|
||||||
</FormGroup>
|
id="folderName"
|
||||||
<FormGroup row>
|
value={this.state.childName}
|
||||||
<Label for="fileName" sm={3}>{gettext('Name')}: </Label>
|
innerRef={input => {this.newInput = input;}}
|
||||||
<Col sm={9}>
|
onKeyPress={this.handleKeyPress}
|
||||||
<Input onKeyPress={this.handleKeyPress} innerRef={input => {this.newInput = input;}} id="fileName" placeholder={gettext('newName')} value={this.state.childName} onChange={this.handleChange}/>
|
onChange={this.handleChange}
|
||||||
</Col>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Form>
|
</Form>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
|
||||||
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>
|
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>
|
||||||
|
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user