<commit_before>import React from 'react';
import Relay from 'react-relay';
import DocumentTitle from 'react-document-title';
import shallowCompare from 'react-addons-shallow-compare';

import Button from '../shared/Button';
import Panel from '../shared/Panel';

import FlashesStore from '../../stores/FlashesStore';

import OrganizationInvitationCreateMutation from '../../mutations/OrganizationInvitationCreate';

import OrganizationMemberRoleConstants from '../../constants/OrganizationMemberRoleConstants';

class MemberNew extends React.Component {
  static propTypes = {
    organization: React.PropTypes.shape({
      name: React.PropTypes.string.isRequired,
      slug: React.PropTypes.string.isRequired,
    }).isRequired
  };

  state = {
    emails: ''
  };

  shouldComponentUpdate(nextProps, nextState) {
    return shallowCompare(this, nextProps, nextState);
  }

  render() {
    return (
      <DocumentTitle title={`Users · ${this.props.organization.name}`}>
        <Panel>
          <Panel.Header>Invite New Users</Panel.Header>
          <Panel.Section>
            Email addresses of people to invite
            Separate each email with a space or a new line
          </Panel.Section>
          <Panel.Section>
            Teams
            Invited users can be added directly into teams. All users will be added to the <i>Everyone</i> team.
          </Panel.Section>
          <Panel.Section>
            Administrator
          </Panel.Section>
          <Panel.Section>
            <Button>Send Invitations</Button>
          </Panel.Section>
        </Panel>
      </DocumentTitle>
    );
  }

  handleCreateInvitationClick = () => {
    // Show the inviting indicator
    this.setState({ inviting: true });

    const mutation = new OrganizationInvitationCreateMutation({
      organization: this.props.organization
    });

    // Run the mutation
    Relay.Store.commitUpdate(mutation, {
      onSuccess: this.handleInvitationCreateSuccess,
      onFailure: this.handleInvitationCreateFailure<commit_msg>Use FormTextarea<commit_after>import React from 'react';
import Relay from 'react-relay';
import DocumentTitle from 'react-document-title';
import shallowCompare from 'react-addons-shallow-compare';

import Button from '../shared/Button';
import Panel from '../shared/Panel';
import FormTextarea from '../shared/FormTextarea';

import FlashesStore from '../../stores/FlashesStore';

import OrganizationInvitationCreateMutation from '../../mutations/OrganizationInvitationCreate';

import OrganizationMemberRoleConstants from '../../constants/OrganizationMemberRoleConstants';

class MemberNew extends React.Component {
  static propTypes = {
    organization: React.PropTypes.shape({
      name: React.PropTypes.string.isRequired,
      slug: React.PropTypes.string.isRequired,
    }).isRequired
  };

  state = {
    emails: ''
  };

  shouldComponentUpdate(nextProps, nextState) {
    return shallowCompare(this, nextProps, nextState);
  }

  render() {
    return (
      <DocumentTitle title={`Users · ${this.props.organization.name}`}>
        <Panel>
          <Panel.Header>Invite New Users</Panel.Header>
          <Panel.Section>
            <FormTextarea
              label="Email addresses of people to invite"
              help="Separate each email with a space or a new line"
              rows={3}
            />
          </Panel.Section>
          <Panel.Section>
            Teams
            Invited users can be added directly into teams. All users will be added to the <i>Everyone</i> team.
          </Panel.Section>
          <Panel.Section>
            Administrator
          </Panel.Section>
          <Panel.Section>
            <Button>Send Invitations</Button>
          </Panel.Section>
        </Panel>
      </DocumentTitle>
    );
  }

  handleCreateInvitationClick = () => {
    // Show the inviting indicator
    this.setState({ inviting: true });

    const mutation = new OrganizationInvitationCreateMutation({
      organization: this.props.organization
    });

    // Run the mutation
    Relay.Store.commitUpdate(mutation, {
      onSuccess: this.handleInvitationCreateSuccess,
      onFailure: this.handleInvitationCreateFailure
{'fraction_non_alphanumeric': 0.10820451843043995, 'fraction_numerical': 0.00023781212841854935, 'mean_word_length': 2.728723404255319, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2617185', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1093, 'n_words': 278}