           title     : "Check your email"
           content   : "We've sent you a password recovery code."
           duration  : 4500
-
         KD.mixpanel "Recover password, success"
 
   resendEmailConfirmationToken:(formData)->

      #   else
      #     window.location.replace '/Activity'

  doRedeem:({inviteCode})->
    return  unless KD.config.entryPoint?.slug or KD.isLoggedIn()

    KD.remote.cacheable KD.config.entryPoint.slug, (err, [group])=>
      group.redeemInvitation inviteCode, (err)=>
        @redeemForm.button.hideLoader()
        return KD.notify_ err.message or err  if err
        KD.notify_ 'Success!'
        KD.getSingleton('mainController').accountChanged KD.whoami()

        KD.mixpanel "Redeem, success"

  hide: (callback) ->


    """

  doReset:({recoveryToken, password})->
    $.ajax
      url       : '/Reset'
      data      : { recoveryToken, password }
      type      : 'POST'
      error     : ->
        new KDNotificationView
          title : "An error occurred: #{err.message}"
      success   : =>
        @resetForm.button.hideLoader()
        @resetForm.reset()
        @headBanner.hide()
        @doLogin {username, password}


  doRecover:({ email })->
    $.ajax
      url         : '/Recover'
      data        : { email }
      type        : 'POST'
      error       : (xhr) =>
        {responseText} = xhr
        new KDNotificationView title : responseText
        @loginForm.button.hideLoader()
      success     : =>
        @recoverForm.reset()
        {entryPoint} = KD.config
        KD.getSingleton('router').handleRoute '/Login', {entryPoint}
