From 1849e3fa780d6804c87c135a3050649cdf1358ee Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Tue, 1 Oct 2019 13:43:17 +0300 Subject: [PATCH] Web: Client: fixed "changePassword" page styles, added logout --- .../Confirm/sub-components/changePassword.js | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changePassword.js b/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changePassword.js index d2bc949b47..7ab71a10cf 100644 --- a/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changePassword.js +++ b/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changePassword.js @@ -24,7 +24,8 @@ import { import { welcomePageTitle } from "../../../../helpers/customNames"; import { changePassword, - getConfirmationInfo + getConfirmationInfo, + logout } from "../../../../../src/store/auth/actions"; const BodyStyle = styled(Container)` @@ -32,6 +33,10 @@ const BodyStyle = styled(Container)` p { margin-bottom: 5px; } +.button-style{ + margin-top: 20px; +} + .password-row { margin: 23px 0 0; .password-card { @@ -93,7 +98,7 @@ class Form extends React.PureComponent { onSubmit = e => { this.setState({ isLoading: true }, function() { const { userId, password, queryString } = this.state; - const { history, changePassword } = this.props; + const { history, changePassword, logout } = this.props; this.setState({ errorText: "" }); let hasError = false; @@ -112,6 +117,7 @@ class Form extends React.PureComponent { changePassword(userId, { password }, queryString) .then(() => { console.log("UPDATE PASSWORD"); + logout(); history.push("/"); }) .catch(e => { @@ -145,7 +151,7 @@ class Form extends React.PureComponent { onCopyToClipboard = () => toastr.success(this.props.t("EmailAndPasswordCopiedToClipboard")); - + validatePassword = value => this.setState({ passwordValid: value }); render() { @@ -170,11 +176,6 @@ class Form extends React.PureComponent { {t("CustomWelcomePageTitle", { welcomePageTitle })} - - - - - {t("PassworResetTitle")} - - - -