diff --git a/store/sql_team_store.go b/store/sql_team_store.go index dfc07d3d88..e0f95fa7e3 100644 --- a/store/sql_team_store.go +++ b/store/sql_team_store.go @@ -32,7 +32,7 @@ func NewSqlTeamStore(sqlStore *SqlStore) TeamStore { func (s SqlTeamStore) UpgradeSchemaIfNeeded() { // REMOVE AFTER 1.2 SHIP see PLT-828 s.RemoveColumnIfExists("Teams", "AllowValet") - s.CreateColumnIfNotExists("Teams", "InviteId", "varchar(26)", "varchar(26)", "") + s.CreateColumnIfNotExists("Teams", "InviteId", "varchar(32)", "varchar(32)", "") s.CreateColumnIfNotExists("Teams", "AllowOpenInvite", "tinyint(1)", "boolean", "0") s.CreateColumnIfNotExists("Teams", "AllowTeamListing", "tinyint(1)", "boolean", "0") } diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index c519959af2..2b9ce67caf 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -185,7 +185,7 @@ export default class Login extends React.Component { if (this.props.inviteId) { userSignUp = (
- {'Do not have an account? '} + {`Don't have an account? `} {'There are no teams include in the Team Directory and team creation has been disabled.'}
); + } + } else { + teamListing = ( +
+

{'Choose a Team'}

+
+ { + this.props.teams.map((team) => { + return ( +
+ +
+ {team.display_name} +
+
+
+ ); + }) + } +
+
+ ); + } + } + + if (global.window.mm_config.EnableTeamCreation !== 'true') { + if (teamListing == null) { + return (
{'Team creation has been disabled. Please contact an administrator for access.'}
); + } + return (
-

{'Choose a Team'}

-
- { - this.props.teams.map((team) => { - return ( -
- -
- {team.display_name} -
-
-
- ); - }) - } -
+ {teamListing}
); } if (this.state.page === 'choose') { return ( - +
+ {teamListing} + +
); } if (this.state.page === 'email') { - return ; + return ( +
+ {teamListing} + +
+ ); } else if (this.state.page === 'gitlab') { - return ; + return ( +
+ {teamListing} + +
+ ); } } } diff --git a/web/react/components/team_general_tab.jsx b/web/react/components/team_general_tab.jsx index 69ba446641..c7c4fa2ea1 100644 --- a/web/react/components/team_general_tab.jsx +++ b/web/react/components/team_general_tab.jsx @@ -54,7 +54,6 @@ export default class GeneralTab extends React.Component { handleTeamListingRadio(listing) { if (global.window.mm_config.EnableTeamListing !== 'true' && listing) { - ReactDOM.findDOMNode(this.refs.teamListingRadioNo).checked = true; this.setState({clientError: 'Team directory has been disabled. Please ask a system admin to enable it.'}); } else { this.setState({allow_team_listing: listing}); @@ -278,13 +277,13 @@ export default class GeneralTab extends React.Component {
-

{'When allowed the team will appear on the main page as part of team directory.'}
+

{'Including this team will display the team name from the Team Directory section of the Home Page, and provide a link to the sign-in page.'}
]; teamListingSection = ( @@ -337,13 +336,13 @@ export default class GeneralTab extends React.Component {
-

{'When allowed the team signup link will be included on the login page and anyone can signup to this team.'}
+

{'When allowed, a link to account creation will be included on the sign-in page of this team and allow any visitor to sign-up.'}
]; openInviteSection = ( @@ -387,7 +386,7 @@ export default class GeneralTab extends React.Component { maxLength='32' /> -

{'When allowing open invites this code is used as part of the signup process. Changing this code will invalidate the previous open signup link.'}
+

{'Your Invite Code is used in the URL sent to people to join your team. Regenerating your Invite Code will invalidate the URLs in previous invitations, unless "Allow anyone to sign-up from login page" is enabled.'}