<commit_before>import * as React from "react";
import {Link, hashHistory} from "react-router";
import * as ReactDOM from "react-dom";
import Navbar from "../navbar/navbar";
import sessionStore, {PermissionLevel} from "../../stores/sessionStore";
import companyActionCreator, {IAddCompanyUser, IAddCompanyName}
    from "../../actions/companyActionCreator";
import ErrorMessage from "./errorMessageComponent";
import companyStore from "../../stores/companyStore";

/**
 * This interface represents the state of the {CompanyRegistration} page.
 */
export interface ICompanyRegistrationState {
    message : string;
    token : string;
}

/**
 * <p>This class represents the registration company page.</p>
 *
 * @history
 * | Author           | Action Performed               | Data       |
 * |------------------|--------------------------------|------------|
 * | <NAME>    | Create interfaces and class    | 06/06/2016 |
 *
 * @author  <NAME>
 * @license MIT
 *
 */
class CompanyRegistration extends
    React.Component<void, ICompanyRegistrationState> {

    /**
     * @description
     * <p>This constructor calls his super constructor.
     * It creates an CompanyRegistration, defines its state and
     * binds _onChange function to "this"</p>
     * @return {AddCompany}
     */
    constructor() {
        super();
        this.state = {
            message: companyStore.getAddCompanyError(),
            token: sessionStore.getAccessToken()
        };

        this._onChange = this._onChange.bind(this);
    }

    /**
     * @description
     * <p>Render method of the component.
     * It renders the CompanyRegistration component.</p>
     * @return {JSX.Element}
     */
    public render() : JSX.Element {
        /* tslint:disable: max-line-length */
        return(
            <div>
                <Navbar userPermission={PermissionLevel.SUPERADMIN} />
                <div id="contentBody" className="container">
                    <div id="titles">
                        <h3>Add company</h3>
                    </div>
                    <div className="divider"></div>
                    <div className="row">
                        <ErrorMessage error={this.state.message} />
                        <form className="col s12">
                            <div className="row">
                                <div className="input-field col s12">
                                    <input id="companyName" type="text" className="validate" ref="companyName"/>
                                    <label for="companyName">Name of the company</label>
                                </div>
                            </div>
                            <div className="row">
                                <div className="input-field col s12">
                                    <i className="material-icons prefix">email</i>
                                    <input id="email" type="email" className="validate"  ref="email"/>
                                    <label for="email">Email of the super Owner</label>
                                </div>
                            </div>
                            <div className="row">
                                <div className="input-field col s12">
                                    <i className="material-icons prefix">lock</i>
                                    <input id="password" type="text" className="validate"  ref="password"/>
                                    <label for="password">Password of the Owner</label>
                                </div>
                            </div>
                            <div className="right">
                                <a className="waves-effect waves-light btn" onClick={this.addCompany.bind(this)}>
                                    <i className="material-icons left">done</i><commit_msg>change navbar to CompanyRegistration page<commit_after>import * as React from "react";
import {Link, hashHistory} from "react-router";
import * as ReactDOM from "react-dom";
import Navbar from "../navbar/navbar";
import sessionStore, {PermissionLevel} from "../../stores/sessionStore";
import companyActionCreator, {IAddCompanyUser, IAddCompanyName}
    from "../../actions/companyActionCreator";
import ErrorMessage from "./errorMessageComponent";
import companyStore from "../../stores/companyStore";

/**
 * This interface represents the state of the {CompanyRegistration} page.
 */
export interface ICompanyRegistrationState {
    message : string;
    token : string;
}

/**
 * <p>This class represents the registration company page.</p>
 *
 * @history
 * | Author           | Action Performed               | Data       |
 * |------------------|--------------------------------|------------|
 * | <NAME>    | Create interfaces and class    | 06/06/2016 |
 *
 * @author  <NAME>
 * @license MIT
 *
 */
class CompanyRegistration extends
    React.Component<void, ICompanyRegistrationState> {

    /**
     * @description
     * <p>This constructor calls his super constructor.
     * It creates an CompanyRegistration, defines its state and
     * binds _onChange function to "this"</p>
     * @return {AddCompany}
     */
    constructor() {
        super();
        this.state = {
            message: companyStore.getAddCompanyError(),
            token: sessionStore.getAccessToken()
        };

        this._onChange = this._onChange.bind(this);
    }

    /**
     * @description
     * <p>Render method of the component.
     * It renders the CompanyRegistration component.</p>
     * @return {JSX.Element}
     */
    public render() : JSX.Element {
        /* tslint:disable: max-line-length */
        return(
            <div>
                <Navbar userPermission={PermissionLevel.GUEST} />
                <div id="contentBody" className="container">
                    <div id="titles">
                        <h3>Add company</h3>
                    </div>
                    <div className="divider"></div>
                    <div className="row">
                        <ErrorMessage error={this.state.message} />
                        <form className="col s12">
                            <div className="row">
                                <div className="input-field col s12">
                                    <input id="companyName" type="text" className="validate" ref="companyName"/>
                                    <label for="companyName">Name of the company</label>
                                </div>
                            </div>
                            <div className="row">
                                <div className="input-field col s12">
                                    <i className="material-icons prefix">email</i>
                                    <input id="email" type="email" className="validate"  ref="email"/>
                                    <label for="email">Email of the super Owner</label>
                                </div>
                            </div>
                            <div className="row">
                                <div className="input-field col s12">
                                    <i className="material-icons prefix">lock</i>
                                    <input id="password" type="text" className="validate"  ref="password"/>
                                    <label for="password">Password of the Owner</label>
                                </div>
                            </div>
                            <div className="right">
                                <a className="waves-effect waves-light btn" onClick={this.addCompany.bind(this)}>
                                    <i className="material-icons left">done</i>
{'fraction_non_alphanumeric': 0.12948336138806163, 'fraction_numerical': 0.004661401009970219, 'mean_word_length': 1.4220758858576357, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2275635', 'n_tokens_mistral': 1846, 'n_tokens_neox': 1756, 'n_words': 447}