--- a/client/src/components/SessionForm.js Mon Dec 03 17:53:37 2018 +0100
+++ b/client/src/components/SessionForm.js Tue Dec 04 18:17:56 2018 +0100
@@ -1,11 +1,9 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
-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 {
@@ -121,7 +119,7 @@
onClick={this.toggleOnTitleEditMode}
className='session-page-title border-0 bg-irinotes-headers text-muted ml-3'
>
- { this.props.currentSession.title || 'Espace titre' }
+ { this.props.currentSession.title || <span className='session-placeholder'>Espace titre</span> }
</div>
);
}
@@ -129,16 +127,15 @@
if (this.state.titleEditMode === true) {
return (
<div className="form-group pr-5">
- <textarea className='session-page-title form-control border-primary bg-secondary text-muted ml-3'
+ <textarea className='session-page-title form-control border-primary bg-secondary text-muted ml-3 session-placeholder'
onKeyDown={ this.saveEdit }
onChange={ this.onChange }
type="textarea"
name="title"
- defaultValue={ this.props.currentSession.title || 'Espace titre' }
+ defaultValue={ this.props.currentSession.title }
placeholder="Espace titre"
ref={title => this.title = title}
- >
- </textarea>
+ ></textarea>
</div>
);
}
@@ -152,7 +149,7 @@
onClick={this.toggleOnDescriptionEditMode}
className="session-page-description border-0 bg-irinotes-headers text-muted ml-3"
>
- { this.props.currentSession.description || 'Espace description' }
+ { this.props.currentSession.description || <span className='session-placeholder'>Espace description</span> }
</div>
);
}
@@ -160,17 +157,16 @@
if (this.state.descriptionEditMode === true) {
return (
<div className="form-group mt-2 pb-2">
- <textarea className="session-page-description form-control border-primary bg-secondary text-muted ml-3"
- onKeyDown={ this.saveEdit }
- onChange={ this.onChange }
- type="textarea"
- name="description"
- defaultValue={ this.props.currentSession.description || 'Espace description' }
- placeholder="Espace description"
- ref={desc => this.desc = desc}
- >
- </textarea>
- </div>
+ <textarea className="session-page-description form-control border-primary bg-secondary text-muted ml-3 session-placeholder"
+ onKeyDown={ this.saveEdit }
+ onChange={ this.onChange }
+ type="textarea"
+ name="description"
+ defaultValue={ this.props.currentSession.description }
+ placeholder="Espace description"
+ ref={desc => this.desc = desc}
+ ></textarea>
+ </div>
);
}
}