Commit a0f56a8d authored by Viacheslav Pavlov's avatar Viacheslav Pavlov
Browse files

Merge branch '622-wrong-opening-sequence-of-generate-ftp-password-pop-ups' into 'master'

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

Closes #622

See merge request genesys-pgr/genesys-ui!604
parents 19d49cc6 0fc285a0
...@@ -54,12 +54,12 @@ class ChangePasswordPage extends React.Component<IFtpPasswordPage> { ...@@ -54,12 +54,12 @@ class ChangePasswordPage extends React.Component<IFtpPasswordPage> {
private show = () => { private show = () => {
const { t } = this.props; const { t } = this.props;
this.setState({ open: true });
confirm(t('user.dashboard.p.ftpPassword.confirm'), { confirm(t('user.dashboard.p.ftpPassword.confirm'), {
confirmLabel: t('common:label.yes'), confirmLabel: t('common:label.yes'),
abortLabel: t('common:label.no'), abortLabel: t('common:label.no'),
}).then(() => { }).then(() => {
this.setState({ open: true });
this.generatePassword(); this.generatePassword();
}); });
} }
......
...@@ -6,6 +6,7 @@ import DialogActions from '@material-ui/core/DialogActions'; ...@@ -6,6 +6,7 @@ import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent'; import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText'; import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle'; import DialogTitle from '@material-ui/core/DialogTitle';
import { StylesProvider } from '@material-ui/core/styles';
interface IConfirmProps extends React.ClassAttributes<any> { interface IConfirmProps extends React.ClassAttributes<any> {
...@@ -45,6 +46,7 @@ class Confirm extends React.Component<IConfirmProps, any> { ...@@ -45,6 +46,7 @@ class Confirm extends React.Component<IConfirmProps, any> {
const {message, description, confirmLabel = 'OK', abortLabel = 'Cancel', confirmOnly = false} = this.props; const {message, description, confirmLabel = 'OK', abortLabel = 'Cancel', confirmOnly = false} = this.props;
return ( return (
<StylesProvider injectFirst>
<Dialog <Dialog
open open
onClose={ this.reject } onClose={ this.reject }
...@@ -70,6 +72,7 @@ class Confirm extends React.Component<IConfirmProps, any> { ...@@ -70,6 +72,7 @@ class Confirm extends React.Component<IConfirmProps, any> {
</Button> </Button>
</DialogActions> </DialogActions>
</Dialog> </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