<commit_before>/** @jsx React.DOM */

var LogIn = React.createClass({

  getInitialState: function() {
    return {
      id: null,
      username: null,
      password: <PASSWORD>
    };
  },

  componentWillMount: function(){
    this.props.setBGImg(true);
  },

  handleUsernameChange: function(e) {
    this.setState({
      id: e.target.value
      username: e.target.value
    });
  },

  handlePasswordChange: function(e) {
    this.setState({ password: e.target.value });
  },

  handleLogin: function(e) {
    e.preventDefault();
    var that = this;
    var user = new UserModel(this.state);
    user.fetch({}, {
      success: function(){
        that.props.setUser(user);
        that.props.transitionTo('/mealplans');
      },
      error: function(){
        alert('Please check your username and/or password!');
      }
    });
  },

  render : function() {
    return (
      <div className="jumbotron-container">
        <div className="jumbotron">
        <h1 className="default-header">Log In</h1>

          <form onSubmit={this.handleLogin}>
            <div className="form-group">

              <label
                className="input-label"
                htmlFor="username">
                  Username
              </label>
              <input
                className="form-control"
                type="text"
                name="username"
                placeholder="Enter username"
                onChange={this.handleUsernameChange}
                required />

            </div>
            <div className="form-group">

              <label
              className="input-label"
              htmlFor="password">
                Password
              </label>
              <input
                className="form-control"
                type="password"
                name="password"
                placeholder="<PASSWORD> password"
                onChange={this.handlePasswordChange}
                required />

            </div>

            <input
              type="submit"
              className="btn btn-default btn-large pull-right"
              value="Log In">
            </input>

          </form>

          <p className="suggested-action">
            Don&#39;t have an account with us?
            <a href="/#/signup">Sign up here.</a>
          </p>

        </div>
      </div>
    );
  }
});
<commit_msg>fix bug in login user attributes<commit_after>/** @jsx React.DOM */

var LogIn = React.createClass({

  getInitialState: function() {
    return {
      id: null,
      username: null,
      password: <PASSWORD>
    };
  },

  componentWillMount: function(){
    this.props.setBGImg(true);
  },

  handleUsernameChange: function(e) {
    this.setState({
      id: e.target.value,
      username: e.target.value
    });
  },

  handlePasswordChange: function(e) {
    this.setState({ password: e.target.value });
  },

  handleLogin: function(e) {
    e.preventDefault();
    var that = this;
    var user = new UserModel(this.state);
    user.fetch({}, {
      success: function(){
        that.props.setUser(user);
        that.props.transitionTo('/mealplans');
      },
      error: function(){
        alert('Please check your username and/or password!');
      }
    });
  },

  render : function() {
    return (
      <div className="jumbotron-container">
        <div className="jumbotron">
        <h1 className="default-header">Log In</h1>

          <form onSubmit={this.handleLogin}>
            <div className="form-group">

              <label
                className="input-label"
                htmlFor="username">
                  Username
              </label>
              <input
                className="form-control"
                type="text"
                name="username"
                placeholder="Enter username"
                onChange={this.handleUsernameChange}
                required />

            </div>
            <div className="form-group">

              <label
              className="input-label"
              htmlFor="password">
                Password
              </label>
              <input
                className="form-control"
                type="password"
                name="password"
                placeholder="Enter password"
                onChange={this.handlePasswordChange}
                required />

            </div>

            <input
              type="submit"
              className="btn btn-default btn-large pull-right"
              value="Log In">
            </input>

          </form>

          <p className="suggested-action">
            Don&#39;t have an account with us?
            <a href="/#/signup">Sign up here.</a>
          </p>

        </div>
      </div>
    );
  }
});

{'fraction_non_alphanumeric': 0.1270741440873766, 'fraction_numerical': 0.0016803192606595252, 'mean_word_length': 1.475051975051975, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 54, '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': '4701391', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1237, 'n_words': 249}