Merge branch 'release-3.3' RC3
Этот коммит содержится в:
@@ -28,6 +28,7 @@ export default class ConfigurationSettings extends AdminSettings {
|
||||
}
|
||||
|
||||
getConfigFromState(config) {
|
||||
config.ServiceSettings.SiteURL = this.state.siteURL;
|
||||
config.ServiceSettings.ListenAddress = this.state.listenAddress;
|
||||
config.ServiceSettings.WebserverMode = this.state.webserverMode;
|
||||
|
||||
@@ -36,6 +37,7 @@ export default class ConfigurationSettings extends AdminSettings {
|
||||
|
||||
getStateFromConfig(config) {
|
||||
return {
|
||||
siteURL: config.ServiceSettings.SiteURL,
|
||||
listenAddress: config.ServiceSettings.ListenAddress,
|
||||
webserverMode: config.ServiceSettings.WebserverMode
|
||||
};
|
||||
@@ -55,6 +57,24 @@ export default class ConfigurationSettings extends AdminSettings {
|
||||
renderSettings() {
|
||||
return (
|
||||
<SettingsGroup>
|
||||
<TextSetting
|
||||
id='siteURL'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='admin.service.siteURL'
|
||||
defaultMessage='Site URL:'
|
||||
/>
|
||||
}
|
||||
placeholder={Utils.localizeMessage('admin.service.siteURLExample', 'Ex "https://mattermost.example.com:1234"')}
|
||||
helpText={
|
||||
<FormattedMessage
|
||||
id='admin.service.siteURLDescription'
|
||||
defaultMessage='The URL, including port number and protocol, from which users will access Mattermost. Leave blank to automatically configure based on incoming traffic.'
|
||||
/>
|
||||
}
|
||||
value={this.state.siteURL}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<TextSetting
|
||||
id='listenAddress'
|
||||
label={
|
||||
|
||||
@@ -3,17 +3,10 @@
|
||||
|
||||
import ReactDOM from 'react-dom';
|
||||
import Client from 'client/web_client.jsx';
|
||||
import Constants from 'utils/constants.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import {Modal} from 'react-bootstrap';
|
||||
|
||||
import {injectIntl, intlShape, defineMessages, FormattedMessage} from 'react-intl';
|
||||
|
||||
var holders = defineMessages({
|
||||
submit: {
|
||||
id: 'admin.reset_password.submit',
|
||||
defaultMessage: 'Please enter at least {chars} characters.'
|
||||
}
|
||||
});
|
||||
import {injectIntl, intlShape, FormattedMessage} from 'react-intl';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
@@ -31,13 +24,13 @@ class ResetPasswordModal extends React.Component {
|
||||
|
||||
doSubmit(e) {
|
||||
e.preventDefault();
|
||||
var password = ReactDOM.findDOMNode(this.refs.password).value;
|
||||
const password = this.refs.password.value;
|
||||
|
||||
if (!password || password.length < Constants.MIN_PASSWORD_LENGTH) {
|
||||
this.setState({serverError: this.props.intl.formatMessage(holders.submit, {chars: Constants.MIN_PASSWORD_LENGTH})});
|
||||
const passwordErr = Utils.isValidPassword(password);
|
||||
if (passwordErr) {
|
||||
this.setState({serverError: passwordErr});
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({serverError: null});
|
||||
|
||||
Client.adminResetPassword(
|
||||
|
||||
@@ -105,7 +105,7 @@ export default class TeamUrl extends React.Component {
|
||||
nameDivClass += ' has-error';
|
||||
}
|
||||
|
||||
const title = `${window.mm_config.SiteURL}/`;
|
||||
const title = `${Utils.getSiteURL()}/`;
|
||||
const urlTooltip = (
|
||||
<Tooltip id='urlTooltip'>{title}</Tooltip>
|
||||
);
|
||||
|
||||
@@ -97,7 +97,7 @@ export default class InstalledIncomingWebhook extends React.Component {
|
||||
id='installed_integrations.url'
|
||||
defaultMessage='URL: {url}'
|
||||
values={{
|
||||
url: window.mm_config.SiteURL + '/hooks/' + incomingWebhook.id
|
||||
url: Utils.getSiteURL() + '/hooks/' + incomingWebhook.id
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
|
||||
@@ -591,7 +591,7 @@ export default class SignupUserComplete extends React.Component {
|
||||
<a
|
||||
className='btn btn-custom-login google'
|
||||
key='google'
|
||||
href={Client.getOAuthRoute() + '/google/signup' + window.location.search + '&team=' + encodeURIComponent(this.state.teamName)}
|
||||
href={Client.getOAuthRoute() + '/google/signup' + window.location.search}
|
||||
>
|
||||
<span className='icon'/>
|
||||
<span>
|
||||
@@ -609,7 +609,7 @@ export default class SignupUserComplete extends React.Component {
|
||||
<a
|
||||
className='btn btn-custom-login office365'
|
||||
key='office365'
|
||||
href={Client.getOAuthRoute() + '/office365/signup' + window.location.search + '&team=' + encodeURIComponent(this.state.teamName)}
|
||||
href={Client.getOAuthRoute() + '/office365/signup' + window.location.search}
|
||||
>
|
||||
<span className='icon'/>
|
||||
<span>
|
||||
|
||||
Ссылка в новой задаче
Block a user