// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import {FormattedMessage} from 'react-intl'; import * as Utils from 'utils/utils.jsx'; import Constants from 'utils/constants.jsx'; import React from 'react'; export default class SettingItemMax extends React.Component { constructor(props) { super(props); this.onKeyDown = this.onKeyDown.bind(this); } onKeyDown(e) { if (e.keyCode === Constants.KeyCodes.ENTER) { this.props.submit(e); } } componentDidMount() { document.addEventListener('keydown', this.onKeyDown); } componentWillUnmount() { document.removeEventListener('keydown', this.onKeyDown); } render() { var clientError = null; if (this.props.client_error) { clientError = (
); } var serverError = null; if (this.props.server_error) { serverError = (); } var extraInfo = null; if (this.props.extraInfo) { extraInfo = (