<commit_before>LoginViewInlineForm      = require './../login/loginviewinlineform'
LoginInputView           = require './../login/logininputview'

RegisterInlineForm = require './../login/registerform'

module.exports = class HomeRegisterForm extends RegisterInlineForm

  ENTER          = 13

  constructor:(options={},data)->

    super options, data

    @email.destroy()
    @email = new LoginInputView
      inputOptions    :
        name          : "email"
        placeholder   : "email address"
        testPath      : "register-form-email"
        keyup         : (event) => @button.click event  if event.which is ENTER
        validate      : @getEmailValidator()
        decorateValidation: no
        focus         : => @email.icon.unsetTooltip()
        keyup         : (event) => @submitForm event  if event.which is ENTER

    @password.destroy()
    @password = new LoginInputView
      inputOptions    :
        name          : "password"
        type          : "password"
        testPath      : "recover-password"
        placeholder   : "Password"
        keyup         : (event) =>
          if event.which is ENTER
            @password.input.validate()
            @button.click event
        validate      :
          container   : this
          rules       :
            required  : yes
            minLength : 8
          messages    :
            required  : 'Please enter a password.'
            minLength : 'Passwords should be at least 8 characters.'
          events      :
            required  : 'blur'
            minLength : 'blur'

    @email.setOption 'stickyTooltip', yes
    @password.setOption 'stickyTooltip', yes

    @email.input.on    'focus', @bound 'handleFocus'
    @password.input.on 'focus', @bound 'handleFocus'
    @email.input.on    'blur',  =>
      log 'why not you yavsak'
      @fetchGravatarInfo @email.input.getValue()

    KD.singletons.router.on 'RouteInfoHandled', =>
      @email.icon.unsetTooltip()
      @password.icon.unsetTooltip()


  pistachio : ->

    """<commit_msg>login: removed cursing<commit_after>LoginViewInlineForm      = require './../login/loginviewinlineform'
LoginInputView           = require './../login/logininputview'

RegisterInlineForm = require './../login/registerform'

module.exports = class HomeRegisterForm extends RegisterInlineForm

  ENTER          = 13

  constructor:(options={},data)->

    super options, data

    @email.destroy()
    @email = new LoginInputView
      inputOptions    :
        name          : "email"
        placeholder   : "email address"
        testPath      : "register-form-email"
        keyup         : (event) => @button.click event  if event.which is ENTER
        validate      : @getEmailValidator()
        decorateValidation: no
        focus         : => @email.icon.unsetTooltip()
        keyup         : (event) => @submitForm event  if event.which is ENTER

    @password.destroy()
    @password = new LoginInputView
      inputOptions    :
        name          : "password"
        type          : "password"
        testPath      : "recover-password"
        placeholder   : "Password"
        keyup         : (event) =>
          if event.which is ENTER
            @password.input.validate()
            @button.click event
        validate      :
          container   : this
          rules       :
            required  : yes
            minLength : 8
          messages    :
            required  : 'Please enter a password.'
            minLength : 'Passwords should be at least 8 characters.'
          events      :
            required  : 'blur'
            minLength : 'blur'

    @email.setOption 'stickyTooltip', yes
    @password.setOption 'stickyTooltip', yes

    @email.input.on    'focus', @bound 'handleFocus'
    @password.input.on 'focus', @bound 'handleFocus'
    @email.input.on    'blur',  => @fetchGravatarInfo @email.input.getValue()

    KD.singletons.router.on 'RouteInfoHandled', =>
      @email.icon.unsetTooltip()
      @password.icon.unsetTooltip()


  pistachio : ->

    """
{'fraction_non_alphanumeric': 0.10389930898321817, 'fraction_numerical': 0.0019743336623889436, 'mean_word_length': 1.8145833333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '3833227', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1088, 'n_words': 259}