<commit_before>import React from 'react';

import Input from 'react-bootstrap/lib/Input';

import ValidatedInput from '../components/validated-input-field.jsx';
import QuestionContainer from '../components/question-container.jsx';
import StateField from '../components/state-field.jsx';
import CountryField from '../components/country-field.jsx';
import BaseSection from './base-section.jsx'

export default class ContactFields extends BaseSection {

    render() {
        return (
            <div>
                <div className="form-group">
                    <ValidatedInput {...this.props}
                        required={true}
                        label="Address 1"
                        ref="data.q_address_1"
                        fieldName="data.q_address_1"
                        value={this.props.data.q_address_1}
                        onChange={this.handleChange}
                    />
                </div>
                <div className="form-group">
                    <ValidatedInput {...this.props}
                        label="Address 2"
                        type="text"
                        ref="data.q_address_2"
                        fieldName="data.q_address_2"
                        value={this.props.data.q_address_2}
                        onChange={this.handleChange}
                    />
                </div>
                <div className="row">
                    <div className="col-md-5">
                        <ValidatedInput {...this.props}
                            required={true}
                            label="City"
                            ref="data.q_address_city"
                            fieldName="data.q_address_city"
                            value={this.props.data.q_address_city}
                            onChange={this.handleChange}
                        />
                    </div>
                    <div className="col-md-2">
                        <div className="form-group">
                            <StateField {...this.props}
                                required={true}
                                label="State/Province"
                                ref="data.q_address_state"
                                fieldName="data.q_address_state"
                                onChange={this.handleChange}
                            />
                        </div>
                    </div>
                    <div className='col-md-2'>
                       <QuestionContainer {...this.props}
                          criteria={ {key : 'q_address_state', value : "Other" } }
                          >
                          <ValidatedInput {...this.props}
                              label="Other"
                              value={this.props.data.q_address_state_other}
                              fieldName="data.q_address_state_other"
                              ref="data.q_address_state_other"
                              onChange={this.handleChange}
                          />
                      </QuestionContainer>
                    </div>
                    <div className="col-md-3">
                        <ValidatedInput {...this.props}
                            required={true}
                            label="Zip"
                            ref="data.q_address_zip"
                            fieldName="data.q_address_zip"
                            value={this.props.data.q_address_zip}
                            onChange={this.handleChange}
                        />

                    </div>
                </div>
                <div className="form-group">
                    <CountryField {...this.props}
                        required={true}
                        label="Country"
                        ref="data.q_address_country"
                        fieldName="data.q_address_country"
                        onChange={this.handleChange}
                    />
                </div>

                <div className="row">
                    <div className="col-md-6">
                        <div className="form-group">
                            <ValidatedInput {...this.props}
                                label="Email address"<commit_msg>Change layout of other fields<commit_after>import React from 'react';

import Input from 'react-bootstrap/lib/Input';

import ValidatedInput from '../components/validated-input-field.jsx';
import QuestionContainer from '../components/question-container.jsx';
import StateField from '../components/state-field.jsx';
import CountryField from '../components/country-field.jsx';
import BaseSection from './base-section.jsx'

export default class ContactFields extends BaseSection {

    render() {
        return (
            <div>
                <div className="form-group">
                    <ValidatedInput {...this.props}
                        required={true}
                        label="Address 1"
                        ref="data.q_address_1"
                        fieldName="data.q_address_1"
                        value={this.props.data.q_address_1}
                        onChange={this.handleChange}
                    />
                </div>
                <div className="form-group">
                    <ValidatedInput {...this.props}
                        label="Address 2"
                        type="text"
                        ref="data.q_address_2"
                        fieldName="data.q_address_2"
                        value={this.props.data.q_address_2}
                        onChange={this.handleChange}
                    />
                </div>
                <div className="row">
                    <div className="col-md-6">
                        <ValidatedInput {...this.props}
                            required={true}
                            label="City"
                            ref="data.q_address_city"
                            fieldName="data.q_address_city"
                            value={this.props.data.q_address_city}
                            onChange={this.handleChange}
                        />
                    </div>
                    <div className="col-md-3">
                        <div className="form-group">
                            <StateField {...this.props}
                                required={true}
                                label="State/Province"
                                ref="data.q_address_state"
                                fieldName="data.q_address_state"
                                onChange={this.handleChange}
                            />
                        </div>
                        <QuestionContainer {...this.props}
                           criteria={ {key : 'q_address_state', value : "Other" } }
                           >
                           <ValidatedInput {...this.props}
                               label="Other"
                               value={this.props.data.q_address_state_other}
                               fieldName="data.q_address_state_other"
                               ref="data.q_address_state_other"
                               onChange={this.handleChange}
                           />
                       </QuestionContainer>
                    </div>

                    <div className="col-md-3">
                        <ValidatedInput {...this.props}
                            required={true}
                            label="Zip"
                            ref="data.q_address_zip"
                            fieldName="data.q_address_zip"
                            value={this.props.data.q_address_zip}
                            onChange={this.handleChange}
                        />

                    </div>
                </div>
                <div className="form-group">
                    <CountryField {...this.props}
                        required={true}
                        label="Country"
                        ref="data.q_address_country"
                        fieldName="data.q_address_country"
                        onChange={this.handleChange}
                    />
                </div>

                <div className="row">
                    <div className="col-md-6">
                        <div className="form-group">
                            <ValidatedInput {...this.props}
                                label="Email address"
{'fraction_non_alphanumeric': 0.09657615112160567, 'fraction_numerical': 0.0029515938606847697, 'mean_word_length': 0.8955023495189081, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 63, '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': '1870205', 'n_tokens_mistral': 1915, 'n_tokens_neox': 1807, 'n_words': 274}