Add Groups

This commit is contained in:
2017-01-10 08:08:45 -05:00
parent bea8be18ff
commit 9ed692aa10
20 changed files with 740 additions and 62 deletions

View File

@ -35,12 +35,20 @@ const LoginBar = React.createClass({
e.preventDefault();
this.props.onCreateNewUser();
},
handleNewGroupSubmit: function(e) {
e.preventDefault();
this.props.onCreateNewGroup();
},
render: function() {
return (
<form onSubmit={this.handleSubmit}>
<FormGroup>
<Row>
<Col xs={4}></Col>
<Col xs={2}></Col>
<Col xs={2}>
<Button bsStyle="link"
onClick={this.handleNewGroupSubmit}>New Group</Button>
</Col>
<Col xs={2}>
<Button bsStyle="link"
onClick={this.handleNewUserSubmit}>New User</Button>
@ -102,7 +110,7 @@ module.exports = React.createClass({
var barContents;
var errorAlert;
if (!this.props.user.isUser())
barContents = <LoginBar onLogin={this.props.onLogin} onCreateNewUser={this.props.onCreateNewUser} />;
barContents = <LoginBar onLogin={this.props.onLogin} onCreateNewUser={this.props.onCreateNewUser} onCreateNewGroup={this.props.onCreateNewGroup} />;
else
barContents = <LogoutBar user={this.props.user} onLogout={this.props.onLogout} onAccountSettings={this.props.onAccountSettings}/>;
if (this.props.error.isError())