import React from 'react'; import { Link } from 'react-router'; import { Row, Col, FormGroup, ControlLabel, FormControl, InputGroup, Button } from 'react-bootstrap'; import handleSignup from '../../modules/signup'; import { Orgs } from '/imports/collections/orgs/index'; 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) { event.preventDefault(); } checkExistingOrgSlug() { console.log(this.state.orgSlug); if(this.state.orgSlug==""){return null} searchOrg = Orgs.find({slug:this.state.orgSlug}).fetch(); if(searchOrg.length>0){ return "error" }else{ return "success" } } render() { return (

Sign Up

(this.signupForm = form) } onSubmit={ this.handleSubmit } > Organisation name this.handleChange(e)} /> @yd.com First Name Last Name Email Address Password

Already have an account? Log In.

); } }