var React = require('react'); var ReactBootstrap = require('react-bootstrap'); var Alert = ReactBootstrap.Alert; var Input = ReactBootstrap.Input; var Button = ReactBootstrap.Button; var DropdownButton = ReactBootstrap.DropdownButton; var MenuItem = ReactBootstrap.MenuItem; var Row = ReactBootstrap.Row; var Col = ReactBootstrap.Col; const LoginBar = React.createClass({ getInitialState: function() { return {username: '', password: ''}; }, onUsernameChange: function(e) { this.setState({username: e.target.value}); }, onPasswordChange: function(e) { this.setState({password: e.target.value}); }, handleSubmit: function(e) { var user = new User(); e.preventDefault(); user.Username = this.refs.username.getValue(); user.Password = this.refs.password.getValue(); this.props.onLoginSubmit(user); }, handleNewUserSubmit: function(e) { e.preventDefault(); this.props.onCreateNewUser(); }, render: function() { return (
); } }); const LogoutBar = React.createClass({ handleOnSelect: function(e, key) { if (key == 1) { if (this.props.onAccountSettings != null) this.props.onAccountSettings(); } else if (key == 2) { this.props.onLogoutSubmit(); } }, render: function() { var signedInString = "Signed in as "+this.props.user.Name; return (Error {this.props.error.ErrorId}: {this.props.error.ErrorString}