mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 01:12:03 +00:00
fix warning
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from '@reach/router';
|
||||
import { Button, Modal, Input, ModalBody, Form, FormGroup, Label } from 'reactstrap';
|
||||
import { Button, Modal, Input, ModalBody, Form, FormGroup } from 'reactstrap';
|
||||
import { gettext, siteRoot } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
|
||||
const propTypes = {
|
||||
repoID: PropTypes.string.isRequired,
|
||||
onLibDecryptDialog: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
|
||||
class LibDecryptDialog extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -24,7 +28,8 @@ class LibDecryptDialog extends React.Component {
|
||||
this.setState({
|
||||
showError: true
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
@@ -49,25 +54,27 @@ class LibDecryptDialog extends React.Component {
|
||||
return (
|
||||
<Modal isOpen={true} centered={true}>
|
||||
<ModalBody>
|
||||
<button type="button" className="close" onClick={this.toggle}><span aria-hidden="true">×</span></button>
|
||||
<Form className="lib-decrypt-form text-center">
|
||||
<img src={siteRoot + 'media/img/lock.png'} alt=""/>
|
||||
<p>{gettext('This library is password protected')}</p>
|
||||
{this.state.showError &&
|
||||
<p className="error">{gettext('Wrong password')}</p>
|
||||
}
|
||||
<FormGroup>
|
||||
<Input type="password" name="password" onKeyPress={this.handleKeyPress} placeholder={gettext('Password')} onChange={this.handleChange}/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<Button type="submit" value="Submit" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
||||
</FormGroup>
|
||||
<p className="tip">{'* '}{gettext('The password will be kept in the server for only 1 hour.')}</p>
|
||||
</Form>
|
||||
<button type="button" className="close" onClick={this.toggle}><span aria-hidden="true">×</span></button>
|
||||
<Form className="lib-decrypt-form text-center">
|
||||
<img src={siteRoot + 'media/img/lock.png'} alt=""/>
|
||||
<p>{gettext('This library is password protected')}</p>
|
||||
{this.state.showError &&
|
||||
<p className="error">{gettext('Wrong password')}</p>
|
||||
}
|
||||
<FormGroup>
|
||||
<Input type="password" name="password" onKeyPress={this.handleKeyPress} placeholder={gettext('Password')} onChange={this.handleChange}/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<Button type="submit" value="Submit" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
||||
</FormGroup>
|
||||
<p className="tip">{'* '}{gettext('The password will be kept in the server for only 1 hour.')}</p>
|
||||
</Form>
|
||||
</ModalBody>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
LibDecryptDialog.propTypes = propTypes;
|
||||
|
||||
export default LibDecryptDialog;
|
||||
|
Reference in New Issue
Block a user