<commit_before>import React from 'react'
import i18n from 'app/utils/i18n'
import {Tip} from 'app/components'

export function make_projectname(props){
  return {
    tip: (
      <Tip
        subtitle={i18n("Create projects to categorize clients, jobs, etc.")}
        description={i18n("Projects allows to have related services, rules and issues together.")}
        />
    ),
    work: (
      <div className="ui fill centered area">
        <h2 className="ui header">{i18n("Choose a name for your project")}</h2>
        <div className="ui form">
          <input type="text" placeholder={i18n("Name your project")} id="project_name"/>
          <button
            className="ui basic teal button"
            style={{marginTop: 30}}
            onClick={() => props.handleCreateProject($('input#project_name').val())}
            >{i18n("Create and continue")}</button>
        </div>
      </div>
    )
  }
}<commit_msg>Can press enter to submit project name<commit_after>import React from 'react'
import i18n from 'app/utils/i18n'
import {Tip} from 'app/components'

function maybe_submit(ev){
  if (ev.charCode==13){
    $('#project_name_submit').click()
  }
}

export function make_projectname(props){
  return {
    tip: (
      <Tip
        subtitle={i18n("Create projects to categorize clients, jobs, etc.")}
        description={i18n("Projects allows to have related services, rules and issues together.")}
        />
    ),
    work: (
      <div className="ui fill centered area">
        <h2 className="ui header">{i18n("Choose a name for your project")}</h2>
        <div className="ui form">
          <input type="text" placeholder={i18n("Name your project")} id="project_name" onKeyPress={maybe_submit}/>
          <button
            className="ui basic teal button"
            style={{marginTop: 30}}
            onClick={() => props.handleCreateProject($('input#project_name').val())}
            id="project_name_submit"
            >{i18n("Create and continue")}</button>
        </div>
      </div>
    )
  }
}
{'fraction_non_alphanumeric': 0.14425907752698724, 'fraction_numerical': 0.018645731108930325, 'mean_word_length': 2.811214953271028, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '4440632', 'n_tokens_mistral': 615, 'n_tokens_neox': 597, 'n_words': 157}