Adding error when enabling team dir without global prop being set.

Этот коммит содержится в:
=Corey Hulen
2015-10-29 08:54:27 -07:00
родитель 0b967b2acb
Коммит bedf85a122

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

@@ -53,8 +53,13 @@ export default class GeneralTab extends React.Component {
} }
handleTeamListingRadio(listing) { 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}); this.setState({allow_team_listing: listing});
} }
}
handleOpenInviteSubmit(e) { handleOpenInviteSubmit(e) {
e.preventDefault(); e.preventDefault();
@@ -263,6 +268,7 @@ export default class GeneralTab extends React.Component {
<div className='radio'> <div className='radio'>
<label> <label>
<input <input
ref='teamListingRadioNo'
name='userTeamListingOptions' name='userTeamListingOptions'
type='radio' type='radio'
defaultChecked={!this.state.allow_team_listing} defaultChecked={!this.state.allow_team_listing}
@@ -272,7 +278,7 @@ export default class GeneralTab extends React.Component {
</label> </label>
<br/> <br/>
</div> </div>
<div><br/>{'When allowed then the team will appear on the main page as part of team directory if team browsing is enabled in the system console.'}</div> <div><br/>{'When allowed the team will appear on the main page as part of team directory.'}</div>
</div> </div>
]; ];
@@ -282,6 +288,7 @@ export default class GeneralTab extends React.Component {
inputs={inputs} inputs={inputs}
submit={this.handleTeamListingSubmit} submit={this.handleTeamListingSubmit}
server_error={serverError} server_error={serverError}
client_error={clientError}
updateSection={this.onUpdateTeamListingSection} updateSection={this.onUpdateTeamListingSection}
/> />
); );