// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
import AdminSettings from './admin_settings.jsx';
import BooleanSetting from './boolean_setting.jsx';
import {FormattedMessage} from 'react-intl';
import SettingsGroup from './settings_group.jsx';
export default class EmailAuthenticationSettings extends AdminSettings {
constructor(props) {
super(props);
this.getConfigFromState = this.getConfigFromState.bind(this);
this.renderSettings = this.renderSettings.bind(this);
}
getConfigFromState(config) {
config.EmailSettings.EnableSignUpWithEmail = this.state.enableSignUpWithEmail;
config.EmailSettings.EnableSignInWithEmail = this.state.enableSignInWithEmail;
config.EmailSettings.EnableSignInWithUsername = this.state.enableSignInWithUsername;
return config;
}
getStateFromConfig(config) {
return {
enableSignUpWithEmail: config.EmailSettings.EnableSignUpWithEmail,
enableSignInWithEmail: config.EmailSettings.EnableSignInWithEmail,
enableSignInWithUsername: config.EmailSettings.EnableSignInWithUsername
};
}
renderTitle() {
return (
);
}
renderSettings() {
return (
}
helpText={
}
value={this.state.enableSignUpWithEmail}
onChange={this.handleChange}
/>
}
helpText={
}
value={this.state.enableSignInWithEmail}
onChange={this.handleChange}
/>
}
helpText={
}
value={this.state.enableSignInWithUsername}
onChange={this.handleChange}
/>
);
}
}