       $radio.find("[value=\"#{value}\"]").attr("checked", "checked")
 
   setFormFields: (model) ->
-    # console.log "Setting form fields based on: #{JSON.stringify(model)}"
+    # log "Setting form fields based on: #{JSON.stringify(model)}"
     this.fillTextFields(model)
     this.setSelectFields(model)
     this.setCheckboxes(model)


  setAction: (url, method) ->
    methodLower = method.toLowerCase()
    # console.log "Setting form action to #{methodLower} #{url}"
    @form.attr("action", url)
    @form.attr("method", "post")
    @form.formwizard("option", remoteAjax: this.ajaxEvents())

    $button

  setButton: (stepId, name, button) ->
    # log "Setting button for #{stepId} named #{name} to #{JSON.stringify(button)}"
    $buttonsDiv = $("fieldset##{stepId}").find("div.buttons")
    switch name
      when "next"
        # log "Setting #{stepId} submit button val to #{button.label}"
        $button = $buttonsDiv.find('input:submit')
        unless $button.length > 0
          $button = $('<input class="wizard_button wizard_next" type="submit" />').appendTo $buttonsDiv
        $button.val(button.label)
        $button.attr("id", button.id) if button.id?
      when "back"
        # log "Setting reset button val to #{button.label}"
        $button = $buttonsDiv.find('input:reset').val(button.label)
        unless $button.length > 0
          $button = $('<input class="wizard_button wizard_back" type="reset" />').appendTo $buttonsDiv
