Commit 0fc285a0 authored by Oleksii Savran's avatar Oleksii Savran Committed by Viacheslav Pavlov
Browse files

Wrong opening sequence of "Generate FTP password" pop-ups

parent 19d49cc6
......@@ -54,12 +54,12 @@ class ChangePasswordPage extends React.Component<IFtpPasswordPage> {
private show = () => {
const { t } = this.props;
this.setState({ open: true });
confirm(t('user.dashboard.p.ftpPassword.confirm'), {
confirmLabel: t('common:label.yes'),
abortLabel: t('common:label.no'),
}).then(() => {
this.setState({ open: true });
this.generatePassword();
});
}
......
......@@ -6,6 +6,7 @@ import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle';
import { StylesProvider } from '@material-ui/core/styles';
interface IConfirmProps extends React.ClassAttributes<any> {
......@@ -45,6 +46,7 @@ class Confirm extends React.Component<IConfirmProps, any> {
const {message, description, confirmLabel = 'OK', abortLabel = 'Cancel', confirmOnly = false} = this.props;
return (
<StylesProvider injectFirst>
<Dialog
open
onClose={ this.reject }
......@@ -70,6 +72,7 @@ class Confirm extends React.Component<IConfirmProps, any> {
</Button>
</DialogActions>
</Dialog>
</StylesProvider>
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment