From 1503bc105b0c3f6a9e60d02b6233abad07cf57d4 Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Wed, 12 Aug 2020 11:54:08 +0300 Subject: [PATCH] fix link --- web/ASC.Web.Client/src/components/pages/Wizard/index.js | 6 ++++-- .../pages/Wizard/sub-components/input-container.js | 9 ++++++--- web/ASC.Web.Common/src/store/auth/reducer.js | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/web/ASC.Web.Client/src/components/pages/Wizard/index.js b/web/ASC.Web.Client/src/components/pages/Wizard/index.js index a4d80e39e0..debbcebdfa 100644 --- a/web/ASC.Web.Client/src/components/pages/Wizard/index.js +++ b/web/ASC.Web.Client/src/components/pages/Wizard/index.js @@ -152,7 +152,6 @@ class Body extends Component { ]) .then(() => setIsWizardLoaded(true)) .catch((e) => { - console.log(e) this.setState({ errorInitWizard: e })}); @@ -344,7 +343,8 @@ class Body extends Component { machineName, settingsPassword, language, - isLicenseRequired + isLicenseRequired, + urlLicense } = this.props; const { @@ -405,6 +405,7 @@ class Body extends Component { hasErrorEmail={hasErrorEmail} hasErrorPass={hasErrorPass} hasErrorLicense={hasErrorLicense} + urlLicense={urlLicense} onChangeLicense={this.onChangeLicense} isValidPassHandler={this.isValidPassHandler} onChangePassword={this.onChangePassword} @@ -487,6 +488,7 @@ function mapStateToProps(state) { timezones: state.auth.settings.timezones, portalTimezone: state.auth.settings.timezone, + urlLicense: state.auth.settings.urlLicense, isLicenseRequired: state.wizard.isLicenseRequired, licenseUpload: state.wizard.licenseUpload diff --git a/web/ASC.Web.Client/src/components/pages/Wizard/sub-components/input-container.js b/web/ASC.Web.Client/src/components/pages/Wizard/sub-components/input-container.js index c96ec3725b..a7298b0129 100644 --- a/web/ASC.Web.Client/src/components/pages/Wizard/sub-components/input-container.js +++ b/web/ASC.Web.Client/src/components/pages/Wizard/sub-components/input-container.js @@ -58,7 +58,8 @@ const InputContainer = ({ isLicenseRequired, hasErrorEmail, hasErrorPass, - hasErrorLicense + hasErrorLicense, + urlLicense }) => { const refPassInput = useRef(null); @@ -146,7 +147,8 @@ const InputContainer = ({ type="page" color="#116d9d" fontSize="13px" - href="https://gnu.org/licenses/gpl-3.0.html" + target="_blank" + href={urlLicense ? urlLicense : "https://gnu.org/licenses/gpl-3.0.html"} isBold={false} >{t('licenseLink')} @@ -164,7 +166,8 @@ InputContainer.propTypes = { onChangePassword: PropTypes.func.isRequired, isValidPassHandler: PropTypes.func.isRequired, license: PropTypes.bool.isRequired, - onChangeLicense: PropTypes.func.isRequired + onChangeLicense: PropTypes.func.isRequired, + urlLicense: PropTypes.string }; export default InputContainer; \ No newline at end of file diff --git a/web/ASC.Web.Common/src/store/auth/reducer.js b/web/ASC.Web.Common/src/store/auth/reducer.js index 9d3ad2a3b6..d774f3a085 100644 --- a/web/ASC.Web.Common/src/store/auth/reducer.js +++ b/web/ASC.Web.Common/src/store/auth/reducer.js @@ -31,6 +31,7 @@ const initialState = { }, greetingSettings: 'Web Office Applications', enableAdmMess: false, + urlLicense: "https://gnu.org/licenses/gpl-3.0.html" } }