<commit_before>:doc
  @name UISubmit
  @prop {Function} [onFinish]
  @prop {Function} [onStart]
  @prop {Object}    template
  @prop {Markup}   [confirm] block for custom confirm component
  @prop {String}   [confirmMessage] - The message to use before submitting

div(class=props.className onClick=this.submitForm)
  if state.isShowingConfirm
    yield confirm({confirm: this.sendForm, cancel: this.hideMessage})
  yield

:module
  export function showMessage () {
    this.setState({isShowingConfirm: true});
  }

  export function hideMessage () {
    this.setState({isShowingConfirm: false});
  }

  export function submitForm () {
    if (this.props.confirm) return this.showMessage();
    if (this.props.confirmMessage) {
      if (window.confirm(this.props.confirmMessage)) return this.sendForm();
    } else {<commit_msg>do not set onClick function when showing confirm<commit_after>:doc
  @name UISubmit
  @prop {Function} [onFinish]
  @prop {Function} [onStart]
  @prop {Object}    template
  @prop {Markup}   [confirm] block for custom confirm component
  @prop {String}   [confirmMessage] - The message to use before submitting

div(class=props.className onClick=!state.isShowingConfirm ? this.submitForm : null)
  if state.isShowingConfirm
    yield confirm({confirm: this.sendForm, cancel: this.hideMessage})
  yield

:module
  export function showMessage () {
    this.setState({isShowingConfirm: true});
  }

  export function hideMessage () {
    this.setState({isShowingConfirm: false});
  }

  export function submitForm () {
    if (this.props.confirm) return this.showMessage();
    if (this.props.confirmMessage) {
      if (window.confirm(this.props.confirmMessage)) return this.sendForm();
    } else {
{'fraction_non_alphanumeric': 0.11471610660486674, 'fraction_numerical': 0.0, 'mean_word_length': 4.217522658610272, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2069737', 'n_tokens_mistral': 516, 'n_tokens_neox': 511, 'n_words': 137}