       url: @form.attr("action")
       dataType: "json"
       # beforeSubmit: (data) =>
-      #   console.log "Sending these data to the server: #{JSON.stringify data}"
+      #   log "Sending these data to the server: #{JSON.stringify data}"
       success: (serverData) =>
         this.handleServerData serverData
-        # console.log "Successful form POST; got #{JSON.stringify(serverData)}"
+        # log "Successful form POST; got #{JSON.stringify(serverData)}"
       error: (event, status, errorThrown) =>
-        console.log "Error response: #{event.status} #{status} - #{errorThrown} - #{event.responseText}"
+        log "Error response: #{event.status} #{status} - #{errorThrown} - #{event.responseText}"
         try
           appErrors = eval "(#{event.responseText})"
         catch err

      $radio.find("[value=\"#{value}\"]").attr("checked", "checked")

  setFormFields: (model) ->
    # console.log "Setting form fields based on: #{JSON.stringify(model)}"
    this.fillTextFields(model)
    this.setSelectFields(model)
    this.setCheckboxes(model)

    result += "_#{matches[1].toLowerCase()}#{matches[2]}"
  result = string unless result?
  result

log = (msg) ->
  if window['console']?
    console.log msg
