       domId    : "invite-recovery-notification-bar"
       cssClass : "invite-recovery-notification-bar hidden"
       partial  : "..."
-
-    @failureNotice = new KDCustomHTMLView
-      cssClass     : "failure-notice hidden"
 
     setValue = (field, value)=>
       @registerForm[field]?.input?.setValue value


  animateToForm: (name)->

    switch name
      when "register"

        KD.remote.api.JUser.isRegistrationEnabled (status)=>
          if status is no
            log "Registrations are disabled!!!"
            @setFailureNotice
              cssClass  : "registrations-disabled"
              title     : "REGISTRATIONS ARE CURRENTLY DISABLED"
              message   : "We're sorry for that, please follow us on <a href='http://twitter.com/koding' target='_blank'>twitter</a>
                if you want to be notified when registrations are enabled again."
            @github.hide()
            @$(".login-footer").addClass 'hidden'
            @animateToForm "failureNotice"
          else
            @github.show()
            @$(".login-footer").removeClass 'hidden'

        KD.mixpanel "Register form, click"

      when "home"
        parent.notification?.destroy()
        if @headBannerMsg?
          @headBanner.updatePartial @headBannerMsg
          @headBanner.show()

    @unsetClass 'register recover login reset home resendEmail finishRegistration'
    @emit "LoginViewAnimated", name
    @setClass name
    @$('.flex-wrapper').removeClass 'three one'


      when "resendEmail"
        @$('.flex-wrapper').addClass 'one'
        @resendForm.usernameOrEmail.input.setFocus()
      when "reset"
        @formHeader.show()
        @formHeader.updatePartial "Set your new password below"
