From 12896bd23eeba79884245c1c29fdc568cf21a7fa Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Mon, 14 Mar 2016 08:50:46 -0400
Subject: Converting to Webpack. Stage 1.

---
 web/react/components/admin_console/team_users.jsx | 186 ----------------------
 1 file changed, 186 deletions(-)
 delete mode 100644 web/react/components/admin_console/team_users.jsx

(limited to 'web/react/components/admin_console/team_users.jsx')

diff --git a/web/react/components/admin_console/team_users.jsx b/web/react/components/admin_console/team_users.jsx
deleted file mode 100644
index 708907ddb..000000000
--- a/web/react/components/admin_console/team_users.jsx
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import * as Client from '../../utils/client.jsx';
-import LoadingScreen from '../loading_screen.jsx';
-import UserItem from './user_item.jsx';
-import ResetPasswordModal from './reset_password_modal.jsx';
-
-import {FormattedMessage} from 'mm-intl';
-
-export default class UserList extends React.Component {
-    constructor(props) {
-        super(props);
-
-        this.getTeamProfiles = this.getTeamProfiles.bind(this);
-        this.getCurrentTeamProfiles = this.getCurrentTeamProfiles.bind(this);
-        this.doPasswordReset = this.doPasswordReset.bind(this);
-        this.doPasswordResetDismiss = this.doPasswordResetDismiss.bind(this);
-        this.doPasswordResetSubmit = this.doPasswordResetSubmit.bind(this);
-
-        this.state = {
-            teamId: props.team.id,
-            users: null,
-            serverError: null,
-            showPasswordModal: false,
-            user: null
-        };
-    }
-
-    componentDidMount() {
-        this.getCurrentTeamProfiles();
-    }
-
-    getCurrentTeamProfiles() {
-        this.getTeamProfiles(this.props.team.id);
-    }
-
-    getTeamProfiles(teamId) {
-        Client.getProfilesForTeam(
-            teamId,
-            (users) => {
-                var memberList = [];
-                for (var id in users) {
-                    if (users.hasOwnProperty(id)) {
-                        memberList.push(users[id]);
-                    }
-                }
-
-                memberList.sort((a, b) => {
-                    if (a.username < b.username) {
-                        return -1;
-                    }
-
-                    if (a.username > b.username) {
-                        return 1;
-                    }
-
-                    return 0;
-                });
-
-                this.setState({
-                    teamId: this.state.teamId,
-                    users: memberList,
-                    serverError: this.state.serverError,
-                    showPasswordModal: this.state.showPasswordModal,
-                    user: this.state.user
-                });
-            },
-            (err) => {
-                this.setState({
-                    teamId: this.state.teamId,
-                    users: null,
-                    serverError: err.message,
-                    showPasswordModal: this.state.showPasswordModal,
-                    user: this.state.user
-                });
-            }
-        );
-    }
-
-    doPasswordReset(user) {
-        this.setState({
-            teamId: this.state.teamId,
-            users: this.state.users,
-            serverError: this.state.serverError,
-            showPasswordModal: true,
-            user
-        });
-    }
-
-    doPasswordResetDismiss() {
-        this.setState({
-            teamId: this.state.teamId,
-            users: this.state.users,
-            serverError: this.state.serverError,
-            showPasswordModal: false,
-            user: null
-        });
-    }
-
-    doPasswordResetSubmit() {
-        this.setState({
-            teamId: this.state.teamId,
-            users: this.state.users,
-            serverError: this.state.serverError,
-            showPasswordModal: false,
-            user: null
-        });
-    }
-
-    componentWillReceiveProps(newProps) {
-        this.getTeamProfiles(newProps.team.id);
-    }
-
-    render() {
-        var serverError = '';
-        if (this.state.serverError) {
-            serverError = <div className='form-group has-error'><label className='control-label'>{this.state.serverError}</label></div>;
-        }
-
-        if (this.state.users == null) {
-            return (
-                <div className='wrapper--fixed'>
-                    <h3>
-                        <FormattedMessage
-                            id='admin.userList.title'
-                            defaultMessage='Users for {team}'
-                            values={{
-                                team: this.props.team.name
-                            }}
-                        />
-                    </h3>
-                    {serverError}
-                    <LoadingScreen/>
-                </div>
-            );
-        }
-
-        var memberList = this.state.users.map((user) => {
-            return (
-                <UserItem
-                    key={'user_' + user.id}
-                    user={user}
-                    refreshProfiles={this.getCurrentTeamProfiles}
-                    doPasswordReset={this.doPasswordReset}
-                />);
-        });
-
-        return (
-            <div className='wrapper--fixed'>
-                <h3>
-                    <FormattedMessage
-                        id='admin.userList.title2'
-                        defaultMessage='Users for {team} ({count})'
-                        values={{
-                            team: this.props.team.name,
-                            count: this.state.users.length
-                        }}
-                    />
-                </h3>
-                {serverError}
-                <form
-                    className='form-horizontal'
-                    role='form'
-                >
-                    <table className='more-modal__list member-list-holder'>
-                        <tbody>
-                            {memberList}
-                        </tbody>
-                    </table>
-                </form>
-                <ResetPasswordModal
-                    user={this.state.user}
-                    show={this.state.showPasswordModal}
-                    team={this.props.team}
-                    onModalSubmit={this.doPasswordResetSubmit}
-                    onModalDismissed={this.doPasswordResetDismiss}
-                />
-            </div>
-        );
-    }
-}
-
-UserList.propTypes = {
-    team: React.PropTypes.object
-};
-- 
cgit v1.2.3-1-g7c22

