From 612a9b4fd67676e265cde9268a916651b5adda4e Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Thu, 10 Dec 2015 11:18:24 -0800 Subject: Disabling ability to enable team listing on a system where EnableTeamListing=false --- web/react/components/team_general_tab.jsx | 84 +++++++++++++++++++------------ 1 file changed, 52 insertions(+), 32 deletions(-) (limited to 'web/react') diff --git a/web/react/components/team_general_tab.jsx b/web/react/components/team_general_tab.jsx index 03715d585..817a43770 100644 --- a/web/react/components/team_general_tab.jsx +++ b/web/react/components/team_general_tab.jsx @@ -248,44 +248,59 @@ export default class GeneralTab extends React.Component { serverError = this.state.serverError; } + const enableTeamListing = global.window.mm_config.EnableTeamListing === 'true'; + let teamListingSection; if (this.props.activeSection === 'team_listing') { - const inputs = [ -
-
- -
+ const inputs = []; + let submitHandle = null; + + if (enableTeamListing) { + submitHandle = this.handleTeamListingSubmit; + + inputs.push( +
+
+ +
+
+
+ +
+
+

{'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.'}
-
- -
+ ); + } else { + inputs.push( +
+

{'Contact your system administrator to turn on the team directory on the system home page.'}
-

{'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 = (