         "Domain Address"              :
           callback                    : @bound "registerDomain"
           buttons                     :
-            billingButton             :
+            registerButton             :
               title                   : "Register Domain"
               style                   : "cupid-green hidden"
               type                    : "submit"


  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)->
      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"]
    {createButton, billingButton} = form.buttons
    @clearSuggestions()

    {DomainOption, domainName, regYears, domains} = form.inputs

        switch status
          when "regthroughus", "regthroughothers"
            @showSuggestions suggestions
            registerButton.hideLoader()
            return createButton.hideLoader()
          when "unknown"
            notifyUser "An error occured. Please try again later."
            return createButton.hideLoader()
        form = @forms["Domain Address"]
        {createButton, registerButton} = form.buttons
        paymentController = KD.getSingleton('paymentController')
        group             = KD.getSingleton("groupsController").getCurrentGroup()

        registerTheDomain () = ->
            KD.remote.api.JDomain.registerDomain
              domainName : domainInput.getValue()
              years      : regYears.getValue()
            , (err, domain)=>
              if err
                warn err
                notifyUser "An error occured. Please try again later."
              else
                @showSuccess domain
                domain.setDomainCNameToProxyDomain()
              registerButton.hideLoader()

        paymentController.getBillingInfo 'user', group, (err, account)->
          need = err or not account or not account.cardNumber
          if need
            paymentController.setBillingInfo 'user', group, (success)->
              if success
                registerTheDomain()
              else
                registerButton.hideLoader()
          else
            registerTheDomain()



    else if domainOptionValue is 'existing'
      @createDomain {domainName, regYears:0, domainType:'existing'}, (err, domain)=>
