Blame view

imports/client/views/nonOrg/enter/SignupView.js 8.09 KB
dc0d0c739   Deepak   merged Ajays code
1
2
3
4
5
6
  import React                              from 'react';
  import { Link }                           from 'react-router';
  import { Icon }                           from '/imports/client/components/Icon';
  import { LinkContainer }                  from 'react-router-bootstrap';
  import { Row, Col, FormGroup,
    ControlLabel, FormControl,
ad69864f3   Deepak Jha   added ydapp.in su...
7
    InputGroup, Button,
dc0d0c739   Deepak   merged Ajays code
8
9
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
    Navbar,Modal, Nav, NavItem,
      Glyphicon, Collapse,
      NavbarToggler, NavbarBrand,
      NavLink, DropdownItem, DropdownToggle, DropdownMenu,
      NavDropdown, MenuItem }                    from 'react-bootstrap';
  import handleSignup                       from './signup';
  import { Orgs }                           from '/imports/collections/orgs/index';
  import { Meteor }                         from 'meteor/meteor';
  
  import './signup.css';
  
  export default class Signup extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        orgSlug: ""
      };
    }
    componentWillMount(){
      Meteor.subscribe('allOrgsSlug');
    }
  
    componentDidMount() {
      handleSignup({ component: this });
    }
    handleChange(e) {
       this.setState({ orgSlug: e.target.value });
     }
    handleSubmit(event) {
ad69864f3   Deepak Jha   added ydapp.in su...
37
      event.preventDefault();
dc0d0c739   Deepak   merged Ajays code
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
    }
    checkExistingOrgSlug() {
      if(this.state.orgSlug==""){return null}
      searchOrg = Orgs.find({slug:this.state.orgSlug}).fetch();
      if(searchOrg.length>0){
        return "error"
      }else{
        return "success"
      }
    }
  
    render()
    {
      // const {user, org} = this.props.data;
      return(
        <div>
          <div className="wrapper">
02bf55675   anuj_thakur   student view and ...
55
          <div className="Content signupView">
dc0d0c739   Deepak   merged Ajays code
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
            <Row>
              <Col  md={ 12 }>
                <h1>Welcome to YoungDesk!!!</h1>
  
                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                   incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
                    ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
                     in voluptate velit esse cillum dolore eu fugiat nulla pariatur.Excepteur sint occaecat cupidatat non proident,
                     sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
              </Col>
            </Row>
            <Row>
              <Col>
                <br></br>
                <br></br>
              </Col>
            </Row>
            <Row>
              <Col  md={ 3 }>
                <div className="service-box">
                    <i className="fa fa-4x fa-diamond"></i>
                    <h6>Lorem Ipsum</h6>
                </div>
              </Col>
              <Col  md={ 3 }>
                <div className="service-box">
                    <i className="fa fa-4x fa-paper-plane"></i>
                    <h6>Lorem Ipsum</h6>
                </div>
              </Col>
              <Col  md={ 3 }>
                <div className="service-box">
                    <i className="fa fa-4x fa-newspaper-o"></i>
                    <h6>Lorem Ipsum</h6>
                </div>
              </Col>
              <Col  md={ 3 }>
                <div className="service-box">
                    <i className="fa fa-4x fa-heart"></i>
                    <h6>Lorem Ipsum</h6>
                </div>
              </Col>
            </Row>
            <Row>
              <Col>
                <br></br>
                <hr></hr>
              </Col>
            </Row>
            <Row>
              <Col  md={ 12 }>
                <div className="service-box">
                    <h2 className="section-heading">Lets Get In Touch!</h2>
                </div>
              </Col>
            </Row>
            <hr width="10%"></hr>
            <Row>
              <Col  md={ 6 }>
                <div className="service-box">
                    <i className="fa fa-phone fa-2x"></i>
                    <p className="contact">123-456-6789</p>
                </div>
              </Col>
              <Col  md={ 6 }>
                <div className="service-box">
                    <i className="fa fa-envelope-o fa-2x"></i>
                    <p className="contact">feedback@youngdesk.com</p>
                </div>
              </Col>
            </Row>
          </div>
  
          <div className="Signup">
           <Row>
             <Col  md={ 12 }>
               <h4 className="page-header">Sign up with Us</h4>
               <hr></hr>
               <form
                 ref={ form => (this.signupForm = form) }
                 onSubmit={ this.handleSubmit }
               >
                 <span className="side-heading"> Organisation Details </span>
  
               <Row>
               <Col md={ 12 }>
                 <FormGroup controlId="orgSlugField" validationState={this.checkExistingOrgSlug()}>
                   {/* <ControlLabel>Organisation URL</ControlLabel> */}
                   <InputGroup>
                     <FormControl
                       type        ="text"
                       ref         ="orgSlug"
                       name        ="orgSlug"
                       placeholder ="Organisation URL"
                       onChange    = {(e) => this.handleChange(e)}
                     />
                     <InputGroup.Addon>@yd.com</InputGroup.Addon>
                   </InputGroup>
                 </FormGroup>
               </Col>
               </Row>
  
               <Row>
                 <Col md={12}>
                   <FormGroup>
                     {/* <ControlLabel>Organisation Name</ControlLabel> */}
                     <FormControl
                       type="text"
                       ref="orgName"
                       name="orgName"
                       placeholder="Organisation Name"
                     />
                     </FormGroup>
                 </Col>
               </Row>
               <hr width="25%"></hr>
               <span className="side-heading"> Personal Details </span>
               <Row>
                   <Col xs={ 6 }  md={4}  >
                     <FormGroup>
                       {/* <ControlLabel>First Name</ControlLabel> */}
                       <FormControl
                         type="text"
                         ref="firstName"
                         name="firstName"
                         placeholder="First Name"
                       />
                     </FormGroup>
                   </Col>
                   <Col xs={ 6 }  md={4}>
                     <FormGroup>
                       {/* <ControlLabel>Middle Name</ControlLabel> */}
                       <FormControl
                         type="text"
                         ref="midName"
                         name="midName"
                         placeholder="Middle Name"
                       />
                     </FormGroup>
                   </Col>
                   <Col xs={ 6 }  md={4}>
                     <FormGroup>
                       {/* <ControlLabel>Last Name</ControlLabel> */}
                       <FormControl
                         type="text"
                         ref="lastName"
                         name="lastName"
                         placeholder="Last Name"
                       />
                     </FormGroup>
                   </Col>
                 </Row>
                 <hr width="25%"></hr>
                 <span className="side-heading">User Credentials</span>
                 <FormGroup>
                   {/* <ControlLabel>Email Address</ControlLabel> */}
                   <FormControl
                     type="text"
                     ref="emailAddress"
                     name="emailAddress"
                     placeholder="Email Address"
                   />
                 </FormGroup>
                 <FormGroup>
                   {/* <ControlLabel>Password</ControlLabel> */}
                   <FormControl
                     type="password"
                     ref="password"
                     name="password"
                     placeholder="Password"
                   />
                 </FormGroup>
                 {/* <Col md={12} */}
                 <Button type="submit" style={{float:"right"}} className='blue'>Sign Up</Button>
  
               </form>
               </Col>
           </Row>
         </div>
        </div>
      </div>
  
      );
    }
  }