               loader                  :
                 color                 : "#ffffff"
                 diameter              : 24
+              callback                : @bound "registerDomain"
             close                     :
               title                   : "Close"
               style                   : "cupid-green hidden"

                    @suggestionBox?.show()
                    domains.hide()
                    regYears.show()
                    "#{KD.utils.slugify firstName}s-new-domain.com"
                  when "existing"
                    @suggestionBox?.hide()
                    domains.hide()
                    regYears.hide()
                    "#{KD.utils.slugify firstName}s-existing-domain.com"
                  when "subdomain"
                    @suggestionBox?.hide()
                    domains.show()
                    regYears.hide()
                    "#{KD.utils.slugify firstName}s-subdomain"
            domainName                :
              placeholder             : "#{KD.utils.slugify firstName}s-new-domain.com"


    form = @forms["Domain Address"]
    {createButton} = form.buttons

    form.on "FormValidationFailed", createButton.bound 'hideLoader'
    @on "DomainCreationCancelled", createButton.bound 'hideLoader'

  needBilling:(paymentRequired)->
    form = @forms["Domain Address"]
    {createButton, billingButton} = form.buttons

    unless paymentRequired
      createButton.show()
      billingButton.hide()
      return

    paymentController = KD.getSingleton('paymentController')
    group             = KD.getSingleton("groupsController").getCurrentGroup()

    paymentController.getBillingInfo 'user', group, (err, account)->
      console.log arguments
      need = err or not account or not account.cardNumber
      if need
        billingButton.show()
        createButton.hide()
      else
        createButton.show()
        billingButton.hide()

  registerDomain:->
    form = @forms["Domain Address"]
