{"size": 1542, "ext": "js", "max_stars_repo_path": "lib/components/user/terms-of-use-pane.js", "max_stars_repo_name": "philip-cline/otp-react-redux", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/components/user/terms-of-use-pane.js", "max_issues_repo_name": "philip-cline/otp-react-redux", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/components/user/terms-of-use-pane.js", "max_forks_repo_name": "philip-cline/otp-react-redux", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.5555555556, "max_line_length": 146, "alphanum_fraction": 0.6271076524}
import React from 'react'
import { Checkbox, ControlLabel, FormGroup } from 'react-bootstrap'

import { TERMS_OF_SERVICE_PATH, TERMS_OF_STORAGE_PATH } from '../../util/constants'

/**
 * User terms of use pane.
 */
const TermsOfUsePane = ({
  disableCheckTerms,
  handleBlur,
  handleChange,
  values: userData
}) => {
  const {
    hasConsentedToTerms,
    storeTripHistory
  } = userData

  return (
    <div>
      <ControlLabel>You must agree to the terms of service to continue.</ControlLabel>

      <FormGroup>
        <Checkbox
          checked={hasConsentedToTerms}
          disabled={disableCheckTerms}
          name='hasConsentedToTerms'
          onBlur={disableCheckTerms ? null : handleBlur}
          onChange={disableCheckTerms ? null : handleChange}
        >
          {/* TODO: Implement the link */}
            I have read and consent to the <a href={`/#${TERMS_OF_SERVICE_PATH}`} target='_blank'>Terms of Service</a> for using the Trip Planner.
        </Checkbox>
      </FormGroup>

      <FormGroup>
        <Checkbox
          checked={storeTripHistory}
          name='storeTripHistory'
          onBlur={handleBlur}
          onChange={handleChange}
        >
          {/* TODO: Implement the link */}
            Optional: I consent to the Trip Planner storing my historical planned trips in order to
            improve transit services in my area. <a href={`/#${TERMS_OF_STORAGE_PATH}`} target='_blank'>More info...</a>
        </Checkbox>
      </FormGroup>
    </div>
  )
}

export default TermsOfUsePane
