2 import { connect } from 'react-redux'; |
2 import { connect } from 'react-redux'; |
3 import { bindActionCreators } from 'redux'; |
3 import { bindActionCreators } from 'redux'; |
4 import '../App.css'; |
4 import '../App.css'; |
5 import Navbar from './Navbar'; |
5 import Navbar from './Navbar'; |
6 import * as userActions from '../actions/userActions'; |
6 import * as userActions from '../actions/userActions'; |
|
7 import './Settings.css'; |
7 |
8 |
8 class Settings extends Component { |
9 class Settings extends Component { |
9 |
10 |
10 updateSettings = () => { |
11 updateSettings = () => { |
11 const username = this.props.currentUser.username; |
12 const username = this.props.currentUser.username; |
23 return ( |
24 return ( |
24 <div> |
25 <div> |
25 <Navbar history={this.props.history} /> |
26 <Navbar history={this.props.history} /> |
26 <div className="container-fluid"> |
27 <div className="container-fluid"> |
27 <div className="row"> |
28 <div className="row"> |
28 <div className="col-md-6 col-md-offset-3"> |
29 <div className="col-lg-6 offset-md-3"> |
29 <form> |
30 <form> |
30 <div className="form-group"> |
31 <div className="form-group"> |
31 <label className="control-label">Prénom</label> |
32 <label className="col-form-label text-primary">Prénom</label> |
32 <input className="form-control" |
33 <input className="form-control bg-danger text-muted" |
33 name="firstname" |
34 name="firstname" |
34 defaultValue={ firstname } |
35 defaultValue={ firstname } |
35 placeholder="Entrez un prénom" |
36 placeholder="Entrez un prénom" |
36 ref={(firstname) => { this.firstname = firstname; }} |
37 ref={(firstname) => { this.firstname = firstname; }} |
37 /> |
38 /> |
38 </div> |
39 </div> |
39 <div className="form-group"> |
40 <div className="form-group"> |
40 <label className="control-label">Nom</label> |
41 <label className="col-form-label text-primary">Nom</label> |
41 <input className="form-control" |
42 <input className="form-control bg-danger text-muted" |
42 name="lastname" |
43 name="lastname" |
43 defaultValue={ lastname } |
44 defaultValue={ lastname } |
44 placeholder="Entrez un nom" |
45 placeholder="Entrez un nom" |
45 ref={(lastname) => { this.lastname = lastname; }} |
46 ref={(lastname) => { this.lastname = lastname; }} |
46 /> |
47 /> |
47 </div> |
48 </div> |
48 </form> |
49 </form> |
49 <button type="submit" className="btn btn-primary btn-lg" onClick={this.updateSettings}>Enregistrer</button> |
50 <button type="submit" className="btn btn-primary btn-lg text-secondary" onClick={this.updateSettings}>Enregistrer</button> |
50 </div> |
51 </div> |
51 </div> |
52 </div> |
52 </div> |
53 </div> |
53 </div> |
54 </div> |
54 ); |
55 ); |