diff -r be36eed5e6e0 -r b5aafa462956 client/src/components/SessionForm.js --- a/client/src/components/SessionForm.js Thu Aug 03 17:33:00 2017 +0200 +++ b/client/src/components/SessionForm.js Thu Aug 03 19:11:06 2017 +0200 @@ -1,17 +1,18 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Panel, FormGroup, ControlLabel, FormControl } from 'react-bootstrap'; -import GroupForm from './GroupForm'; +import { Panel, FormGroup, ControlLabel, FormControl, Collapse } from 'react-bootstrap'; import '../App.css'; import * as sessionsActions from '../actions/sessionsActions'; import * as authActions from '../actions/authActions'; import _ from 'lodash'; +import './SessionForm.css'; class SessionForm extends Component { state = { - createGroup: false + createGroup: false, + protocolOpen: false } onChange = (e) => { @@ -38,6 +39,13 @@ } } + toggleProtocol = (e) => { + e.preventDefault(); + this.setState({ + protocolOpen: !this.state.protocolOpen + }); + } + render() { if (!this.props.currentSession) { @@ -71,18 +79,13 @@ Group - - { this.props.groups.map((group, key) => - - ) } - +

{this.props.currentSession.group}

- - + + Protocol {this.state.protocolOpen?:} + +
{JSON.stringify(this.props.currentSession.protocol, null, 2)}
+