1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-20 10:20:42 +00:00

fix rename wiki dialog (#8321)

This commit is contained in:
Michael An
2025-10-17 21:59:25 +08:00
committed by GitHub
parent d791aae128
commit 0f08073a08

View File

@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
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';
const propTypes = {
@@ -19,7 +19,6 @@ class RenameWikiDialog extends React.Component {
errMessage: '',
isSubmitBtnActive: false,
};
this.newInput = React.createRef();
}
handleChange = (e) => {
@@ -70,13 +69,10 @@ class RenameWikiDialog extends React.Component {
<Modal isOpen={true} toggle={this.toggle} autoFocus={false}>
<SeahubModalHeader toggle={this.toggle}>{gettext('Rename Wiki')}</SeahubModalHeader>
<ModalBody>
<p>{gettext('New Wiki name')}</p>
<Label for="rename-wiki-input">{gettext('Rename Wiki to')}</Label>
<Input
onKeyDown={this.handleKeyDown}
innerRef={this.newInput}
placeholder="newName"
name="new-wiki-name"
id="new-wiki-name"
name="rename-wiki-input"
value={this.state.newName}
onChange={this.handleChange}
autoFocus={true}