From 6db2dd90793db3e10464c342b27e24764655cb1b Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 2 Nov 2015 12:34:18 -0800 Subject: PLT-951 PLT-972 fixing issues with team directory --- web/react/components/login.jsx | 2 +- web/react/components/signup_team.jsx | 100 +++++++++++++++++++----------- web/react/components/team_general_tab.jsx | 17 +++-- web/sass-files/sass/partials/_signup.scss | 2 +- web/web.go | 2 +- 5 files changed, 75 insertions(+), 48 deletions(-) (limited to 'web') diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index c519959af..2b9ce67ca 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? `} -

{'Choose a Team'}

-
- { - this.props.teams.map((team) => { - return ( - ); + } + } else { + teamListing = ( +
+ ); + } + } + + if (global.window.mm_config.EnableTeamCreation !== 'true') { + if (teamListing == null) { + return (
{'Team creation has been disabled. Please contact an administrator for access.'}
); + } + + return ( +
+ {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 69ba44664..c7c4fa2ea 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.'}