client/src/components/SessionForm.js
changeset 143 cfcbf4bc66f1
parent 135 b5aafa462956
child 148 fcce52a159bc
--- a/client/src/components/SessionForm.js	Wed Jul 18 17:32:09 2018 +0200
+++ b/client/src/components/SessionForm.js	Tue Aug 14 20:34:50 2018 +0200
@@ -1,7 +1,7 @@
 import React, { Component } from 'react';
 import { connect } from 'react-redux';
 import { bindActionCreators } from 'redux';
-import { Panel, FormGroup, ControlLabel, FormControl, Collapse } from 'react-bootstrap';
+import { Collapse } from 'react-bootstrap';
 import '../App.css';
 import * as sessionsActions from '../actions/sessionsActions';
 import * as authActions from '../actions/authActions';
@@ -55,40 +55,42 @@
     }
 
     return (
-      <Panel>
-        <form onSubmit={ e => { e.preventDefault() } }>
-          <FormGroup>
-            <ControlLabel>Title</ControlLabel>
-            <FormControl
-              name="title"
-              defaultValue={ this.props.currentSession.title }
-              onChange={ this.onChange }
-              type="text"
-              placeholder="Enter a title"
-            />
-          </FormGroup>
-          <FormGroup>
-            <ControlLabel>Description</ControlLabel>
-            <FormControl
-              name="description"
-              componentClass="textarea"
-              defaultValue={ this.props.currentSession.description }
-              onChange={ this.onChange }
-              placeholder="Enter a description"
-            />
-          </FormGroup>
-          <FormGroup>
-            <ControlLabel>Group</ControlLabel>
-            <p>{this.props.currentSession.group}</p>
-          </FormGroup>
-          <FormGroup>
-            <ControlLabel onClick={this.toggleProtocol}>Protocol {this.state.protocolOpen?<span className="material-icons protocol-toggle">&#xE313;</span>:<span className="material-icons protocol-toggle">&#xE315;</span>}</ControlLabel>
-            <Collapse in={this.state.protocolOpen}>
-            <pre>{JSON.stringify(this.props.currentSession.protocol, null, 2)}</pre>
-            </Collapse>
-          </FormGroup>
-        </form>
-      </Panel>
+        <div className="panel-default">
+          <div class="panel-body">
+            <form onSubmit={ e => { e.preventDefault() } }>
+              <div className="form-group">
+                <label className="control-label">Titre</label>
+                <input className="form-control"
+                  name="title"
+                  defaultValue={ this.props.currentSession.title }
+                  onChange={ this.onChange }
+                  type="text"
+                  placeholder="Entrez un titre"
+                />
+              </div>
+              <div className="form-group">
+                <label className="control-label">Description</label>
+                <input className="form-control"
+                  type="textarea"
+                  name="description"
+                  defaultValue={ this.props.currentSession.description }
+                  onChange={ this.onChange }
+                  placeholder="Entrez une description"
+                />
+              </div>
+              <div className="form-group">
+                <label className="control-label">Group</label>
+                <p>{this.props.currentSession.group}</p>
+              </div>
+              <div className="form-group">
+                <label className="control-label" onClick={this.toggleProtocol}>Protocol {this.state.protocolOpen?<span className="material-icons protocol-toggle">&#xE313;</span>:<span className="material-icons protocol-toggle">&#xE315;</span>}</label>
+                <Collapse in={this.state.protocolOpen}>
+                <pre>{JSON.stringify(this.props.currentSession.protocol, null, 2)}</pre>
+                </Collapse>
+              </div>
+            </form>
+          </div>
+        </div>
     );
   }
 }