       placeholder : "Type one email address per line"
 
     @emailAddressSubmit = new KDButtonView
-      style    : "submit-email-addresses"
-      title    : "Send"
-      loader   : yes
+      style       : "submit-email-addresses"
+      title       : "Send"
+      loader      :
+        diameter  : 24
       callback    : =>
         @emailAddressSubmit.hideLoader()
         if @emailAddressInput.getValue() is ""

    , =>
      @errorMessage.hide()
      @emailAddressSubmit.hideLoader()
      @emailAddressSubmit.hide()
      @invitationSentButton.show()
      @decorateEmailAddressError fails if fails.length

  enable: ->
    return  unless KD.isLoggedIn()

      @requireLogin cb

  submitEmailAddresses: ->
    emails = @emailAddressInput.getValue().split "\n"
    emails = emails.filter (email) -> email.length > 0

    unless emails.length
      @emailAddressSubmit.hideLoader()
      return

    fails = []

    @emailAddressSubmit.showLoader()
    async.map emails, (email, callback) ->
      KD.remote.api.JReferrableEmail.invite email, (err) ->
        fails.push email if err
