Merge branch 'master' of https://github.com/mattermost/platform into ui-fixes
Этот коммит содержится в:
@@ -83,4 +83,4 @@ TeamSignupEmailItem.propTypes = {
|
||||
email: React.PropTypes.string
|
||||
};
|
||||
|
||||
export default injectIntl(TeamSignupEmailItem);
|
||||
export default injectIntl(TeamSignupEmailItem, {withRef: true});
|
||||
|
||||
@@ -33,8 +33,8 @@ export default class TeamSignupSendInvitesPage extends React.Component {
|
||||
var emails = [];
|
||||
|
||||
for (var i = 0; i < this.props.state.invites.length; i++) {
|
||||
if (this.refs['email_' + i].validate(this.props.state.team.email)) {
|
||||
emails.push(this.refs['email_' + i].getValue());
|
||||
if (this.refs['email_' + i].getWrappedInstance().validate(this.props.state.team.email)) {
|
||||
emails.push(this.refs['email_' + i].getWrappedInstance().getValue());
|
||||
} else {
|
||||
valid = false;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,10 @@ const holders = defineMessages({
|
||||
callbackHolder: {
|
||||
id: 'user.settings.hooks_out.callbackHolder',
|
||||
defaultMessage: 'Each URL must start with http:// or https://'
|
||||
},
|
||||
select: {
|
||||
id: 'user.settings.hooks_out.select',
|
||||
defaultMessage: '--- Select a channel ---'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -153,10 +157,7 @@ class ManageOutgoingHooks extends React.Component {
|
||||
key='select-channel'
|
||||
value=''
|
||||
>
|
||||
<FormattedMessage
|
||||
id='user.settings.hooks_out.select'
|
||||
defaultMessage='--- Select a channel ---'
|
||||
/>
|
||||
{this.props.intl.formatMessage(holders.select)}
|
||||
</option>
|
||||
);
|
||||
|
||||
|
||||
@@ -234,7 +234,10 @@ class UserSettingsModal extends React.Component {
|
||||
|
||||
render() {
|
||||
const {formatMessage} = this.props.intl;
|
||||
var currentUser = UserStore.getCurrentUser();
|
||||
var isAdmin = Utils.isAdmin(currentUser.roles);
|
||||
var tabs = [];
|
||||
|
||||
tabs.push({name: 'general', uiName: formatMessage(holders.general), icon: 'glyphicon glyphicon-cog'});
|
||||
tabs.push({name: 'security', uiName: formatMessage(holders.security), icon: 'glyphicon glyphicon-lock'});
|
||||
tabs.push({name: 'notifications', uiName: formatMessage(holders.notifications), icon: 'glyphicon glyphicon-exclamation-sign'});
|
||||
@@ -243,8 +246,17 @@ class UserSettingsModal extends React.Component {
|
||||
}
|
||||
|
||||
if (global.window.mm_config.EnableIncomingWebhooks === 'true' || global.window.mm_config.EnableOutgoingWebhooks === 'true' || global.window.mm_config.EnableCommands === 'true') {
|
||||
tabs.push({name: 'integrations', uiName: formatMessage(holders.integrations), icon: 'glyphicon glyphicon-transfer'});
|
||||
var show = global.window.mm_config.EnableOnlyAdminIntegrations !== 'true';
|
||||
|
||||
if (global.window.mm_config.EnableOnlyAdminIntegrations === 'true' && isAdmin) {
|
||||
show = true;
|
||||
}
|
||||
|
||||
if (show) {
|
||||
tabs.push({name: 'integrations', uiName: formatMessage(holders.integrations), icon: 'glyphicon glyphicon-transfer'});
|
||||
}
|
||||
}
|
||||
|
||||
tabs.push({name: 'display', uiName: formatMessage(holders.display), icon: 'glyphicon glyphicon-eye-open'});
|
||||
tabs.push({name: 'advanced', uiName: formatMessage(holders.advanced), icon: 'glyphicon glyphicon-list-alt'});
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import TeamStore from '../../stores/team_store.jsx';
|
||||
|
||||
import * as Client from '../../utils/client.jsx';
|
||||
import * as AsyncClient from '../../utils/async_client.jsx';
|
||||
import * as Utils from '../../utils/utils.jsx';
|
||||
import Constants from '../../utils/constants.jsx';
|
||||
|
||||
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'mm-intl';
|
||||
@@ -216,15 +217,12 @@ class SecurityTab extends React.Component {
|
||||
|
||||
var describe;
|
||||
var d = new Date(this.props.user.last_password_update);
|
||||
var timeOfDay = ' am';
|
||||
if (d.getHours() >= 12) {
|
||||
timeOfDay = ' pm';
|
||||
}
|
||||
|
||||
const locale = global.window.mm_locale;
|
||||
const hours12 = !Utils.isMilitaryTime();
|
||||
describe = formatMessage(holders.lastUpdated, {
|
||||
date: d.toLocaleDateString(locale, {month: 'short', day: '2-digit', year: 'numeric'}),
|
||||
time: d.toLocaleTimeString(locale, {hours12: true, hour: '2-digit', minute: '2-digit'}) + timeOfDay
|
||||
time: d.toLocaleTimeString(locale, {hour12: hours12, hour: '2-digit', minute: '2-digit'})
|
||||
});
|
||||
|
||||
updateSectionStatus = function updateSection() {
|
||||
|
||||
Ссылка в новой задаче
Block a user