Merge pull request #1698 from rgarmsen2295/plt-1346

PLT-1346 Hides the ability to enable team listing on a team where it's been disabled in the system console
Этот коммит содержится в:
Christopher Speller
2015-12-11 08:43:00 -05:00
родитель 505445d9d9 612a9b4fd6
Коммит 4d08e77798

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

@@ -248,9 +248,17 @@ export default class GeneralTab extends React.Component {
serverError = this.state.serverError; serverError = this.state.serverError;
} }
const enableTeamListing = global.window.mm_config.EnableTeamListing === 'true';
let teamListingSection; let teamListingSection;
if (this.props.activeSection === 'team_listing') { if (this.props.activeSection === 'team_listing') {
const inputs = [ const inputs = [];
let submitHandle = null;
if (enableTeamListing) {
submitHandle = this.handleTeamListingSubmit;
inputs.push(
<div key='userTeamListingOptions'> <div key='userTeamListingOptions'>
<div className='radio'> <div className='radio'>
<label> <label>
@@ -279,13 +287,20 @@ export default class GeneralTab extends React.Component {
</div> </div>
<div><br/>{'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.'}</div> <div><br/>{'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.'}</div>
</div> </div>
]; );
} else {
inputs.push(
<div key='userTeamListingOptions'>
<div><br/>{'Contact your system administrator to turn on the team directory on the system home page.'}</div>
</div>
);
}
teamListingSection = ( teamListingSection = (
<SettingItemMax <SettingItemMax
title='Include this team in the Team Directory' title='Include this team in the Team Directory'
inputs={inputs} inputs={inputs}
submit={this.handleTeamListingSubmit} submit={submitHandle}
server_error={serverError} server_error={serverError}
client_error={clientError} client_error={clientError}
updateSection={this.onUpdateTeamListingSection} updateSection={this.onUpdateTeamListingSection}
@@ -293,11 +308,16 @@ export default class GeneralTab extends React.Component {
); );
} else { } else {
let describe = ''; let describe = '';
if (enableTeamListing) {
if (this.state.allow_team_listing === true) { if (this.state.allow_team_listing === true) {
describe = 'Yes'; describe = 'Yes';
} else { } else {
describe = 'No'; describe = 'No';
} }
} else {
describe = 'Team directory is turned off for this system.';
}
teamListingSection = ( teamListingSection = (
<SettingItemMin <SettingItemMin