Этот коммит содержится в:
Christopher Speller
2017-01-04 14:11:48 -05:00
коммит произвёл Harrison Healey
родитель b3f2ab654e
Коммит 635628cf30
9 изменённых файлов: 1 добавлений и 249 удалений

Просмотреть файл

@@ -446,18 +446,6 @@ export default class Client {
end(this.handleResponse.bind(this, 'exportTeam', success, error));
}
signupTeam(email, success, error) {
request.
post(`${this.getTeamsRoute()}/signup`).
set(this.defaultHeaders).
type('application/json').
accept('application/json').
send({email}).
end(this.handleResponse.bind(this, 'signupTeam', success, error));
this.track('api', 'api_teams_signup');
}
adminResetMfa(userId, success, error) {
const data = {};
data.user_id = userId;

Просмотреть файл

@@ -1,81 +0,0 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import BrowserStore from 'stores/browser_store.jsx';
import {FormattedMessage} from 'react-intl';
import React from 'react';
import {Link, browserHistory} from 'react-router/es6';
export default class SignupTeamComplete extends React.Component {
constructor(props) {
super(props);
this.updateParent = this.updateParent.bind(this);
}
componentWillMount() {
const data = JSON.parse(this.props.location.query.d);
this.hash = this.props.location.query.h;
var initialState = BrowserStore.getGlobalItem(this.hash);
if (!initialState) {
initialState = {};
initialState.wizard = 'welcome';
initialState.team = {};
initialState.team.email = data.email;
initialState.team.allowed_domains = '';
initialState.invites = [];
initialState.invites.push('');
initialState.invites.push('');
initialState.invites.push('');
initialState.user = {};
initialState.hash = this.hash;
initialState.data = this.props.location.query.d;
}
this.setState(initialState);
}
componentDidMount() {
browserHistory.push('/signup_team_complete/welcome');
}
updateParent(state, skipSet) {
BrowserStore.setGlobalItem(this.hash, state);
if (!skipSet) {
this.setState(state);
browserHistory.push('/signup_team_complete/' + state.wizard);
}
}
render() {
return (
<div>
<div className='signup-header'>
<Link to='/'>
<span className='fa fa-chevron-left'/>
<FormattedMessage id='web.header.back'/>
</Link>
</div>
<div className='col-sm-12'>
<div className='signup-team__container'>
<div id='signup-team-complete'>
{React.cloneElement(this.props.children, {
state: this.state,
updateParent: this.updateParent
})}
</div>
</div>
</div>
</div>
);
}
}
SignupTeamComplete.defaultProps = {
};
SignupTeamComplete.propTypes = {
location: React.PropTypes.object,
children: React.PropTypes.node
};

Просмотреть файл

@@ -22,22 +22,6 @@ describe('Client.Team', function() {
});
});
it('signupTeam', function(done) {
var client = TestHelper.createClient();
var email = TestHelper.fakeEmail();
client.signupTeam(
email,
function(data) {
assert.equal(data.email, email);
done();
},
function(err) {
done(new Error(err.message));
}
);
});
it('createTeam', function(done) {
var client = TestHelper.createClient();
var team = TestHelper.fakeTeam();