Disabling ability to enable team listing on a system where EnableTeamListing=false
Этот коммит содержится в:
@@ -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
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user