Blame view

imports/client/views/org/admin/students/addStudent.js 1.65 KB
796a9c53f   Deepak   add student form
1
2
  import _                                  from 'lodash';
  import { Meteor }                         from 'meteor/meteor';
15998a6af   Deepak   added datepicker
3
  import './student.css'
796a9c53f   Deepak   add student form
4
5
6
7
8
  import React, { Component }               from 'react';
  import { Link,browserHistory }            from 'react-router';
  import { FormGroup,Panel,Table,
    ButtonToolbar,Modal,
    FormControl,Glyphicon,Button }          from 'react-bootstrap';
7efc6960d   anuj_thakur   navigation fixes
9
  import { AddStudentFormContainer }               from './AddStudentFormContainer';
796a9c53f   Deepak   add student form
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  
  const style = {
    margin: 12,
  };
  export class AddStudent extends Component {
    constructor(props) {
      super(props);
      this.state = {
        show: false
      };
      this.showModal = this.showModal.bind(this);
      this.hideModal = this.hideModal.bind(this);
      this.onUpdate = this.onUpdate.bind(this);
    };
  
      showModal() {
        this.setState({show: true});
      }
  
      hideModal() {
        this.setState({show: false});
      }
    onUpdate(key, value) {
      this.setState({[key]: value});
    };
  
    render() {
      return (
796a9c53f   Deepak   add student form
38
39
40
41
42
43
44
45
46
47
48
49
50
51
        <ButtonToolbar>
          <Button bsStyle="primary" onClick={this.showModal}>
            Add Student
          </Button>
          <Modal
            {...this.props}
            show={this.state.show}
            onHide={this.hideModal}
            dialogClassName="custom-modal"
          >
            <Modal.Header closeButton>
              <Modal.Title id="contained-modal-title-lg">New Student</Modal.Title>
            </Modal.Header>
            <Modal.Body>
7efc6960d   anuj_thakur   navigation fixes
52
              <AddStudentFormContainer />
796a9c53f   Deepak   add student form
53
            </Modal.Body>
02bf55675   anuj_thakur   student view and ...
54
    {/*
796a9c53f   Deepak   add student form
55
56
57
            <Modal.Footer>
              <Button onClick={this.hideModal}>Close</Button>
            </Modal.Footer>
02bf55675   anuj_thakur   student view and ...
58
            */}
796a9c53f   Deepak   add student form
59
60
          </Modal>
        </ButtonToolbar>
796a9c53f   Deepak   add student form
61
62
63
64
      );
    };
  
  };