1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

delete texts (#3177)

This commit is contained in:
Michael An
2019-03-26 15:03:27 +08:00
committed by Daniel Pan
parent 5a923b3534
commit 343bc3eca6
2 changed files with 3 additions and 9 deletions

View File

@@ -4,13 +4,11 @@ import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Alert } from 'react
import { gettext } from '../../utils/constants';
import { Utils } from '../../utils/utils';
import FileChooser from '../file-chooser/file-chooser';
import '../../css/dirent-detail.css';
const propTypes = {
repoID: PropTypes.string.isRequired,
filePath: PropTypes.string.isRequired,
toggleCancel: PropTypes.func.isRequired,
dirent: PropTypes.object.isRequired,
getInsertLink: PropTypes.func.isRequired,
};
@@ -52,14 +50,11 @@ class InsertFileDialog extends React.Component {
}
render() {
let subtitle = gettext('Insert file in {placeholder}');
subtitle = subtitle.replace('{placeholder}', '<span class="op-target">' + Utils.HTMLescape(this.props.dirent.name) + '</span>');
const toggle = this.props.toggleCancel;
return (
<Modal isOpen={true} className="sf-add-related-file" toggle={toggle} >
<Modal isOpen={true} toggle={toggle} >
<ModalHeader toggle={toggle}>{gettext('Select File')}</ModalHeader>
<ModalBody>
<div className="related-file-subtitle" dangerouslySetInnerHTML={{__html: subtitle}}></div>
<FileChooser
isShowFile={true}
repoID={this.props.repoID}
@@ -70,8 +65,8 @@ class InsertFileDialog extends React.Component {
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={toggle}>{gettext('Cancel')}</Button>
{this.state.selectedPath ? <Button color="primary" onClick={this.handleInsert}>{gettext('Insert')}</Button>
: <Button color="primary" disabled>{gettext('Insert')}</Button>}
{this.state.selectedPath ? <Button color="primary" onClick={this.handleInsert}>{gettext('Submit')}</Button>
: <Button color="primary" disabled>{gettext('Submit')}</Button>}
</ModalFooter>
</Modal>
);