mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-21 19:00:12 +00:00
fix rename wiki dialog (#8321)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
import { Button, Modal, Input, ModalBody, ModalFooter, Alert } from 'reactstrap';
|
import { Button, Modal, Input, ModalBody, ModalFooter, Alert, Label } from 'reactstrap';
|
||||||
import SeahubModalHeader from '@/components/common/seahub-modal-header';
|
import SeahubModalHeader from '@/components/common/seahub-modal-header';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -19,7 +19,6 @@ class RenameWikiDialog extends React.Component {
|
|||||||
errMessage: '',
|
errMessage: '',
|
||||||
isSubmitBtnActive: false,
|
isSubmitBtnActive: false,
|
||||||
};
|
};
|
||||||
this.newInput = React.createRef();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChange = (e) => {
|
handleChange = (e) => {
|
||||||
@@ -70,13 +69,10 @@ class RenameWikiDialog extends React.Component {
|
|||||||
<Modal isOpen={true} toggle={this.toggle} autoFocus={false}>
|
<Modal isOpen={true} toggle={this.toggle} autoFocus={false}>
|
||||||
<SeahubModalHeader toggle={this.toggle}>{gettext('Rename Wiki')}</SeahubModalHeader>
|
<SeahubModalHeader toggle={this.toggle}>{gettext('Rename Wiki')}</SeahubModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<p>{gettext('New Wiki name')}</p>
|
<Label for="rename-wiki-input">{gettext('Rename Wiki to')}</Label>
|
||||||
<Input
|
<Input
|
||||||
onKeyDown={this.handleKeyDown}
|
onKeyDown={this.handleKeyDown}
|
||||||
innerRef={this.newInput}
|
name="rename-wiki-input"
|
||||||
placeholder="newName"
|
|
||||||
name="new-wiki-name"
|
|
||||||
id="new-wiki-name"
|
|
||||||
value={this.state.newName}
|
value={this.state.newName}
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
|
Reference in New Issue
Block a user