           label         : 'Keep VM always on'
           defaultValue  : @machine.alwaysOn
           itemClass     : KodingSwitch
-          cssClass      : if @machine.isManaged() then 'statustoggle hidden' else 'statustoggle'
+          cssClass      : if isManaged then 'statustoggle hidden' else 'statustoggle'
           disabled      : @machine.isPermanent()
           callback      : @bound 'handleAlwaysOnStateChanged'
         nickname        :


  createForm: ->

    running   = @machine.status.state in [ Running, Starting ]
    accessUri = "http://#{@machine.domain}"

    @addSubView @form = new KDFormViewWithFields
      cssClass          : 'AppModal-form'
      fields            :
        statusToggle    :
          cssClass      : if @machine.isManaged() then 'hidden'
          label         : 'On/Off'
          defaultValue  : running
          itemClass     : KodingSwitch

          partial       : @machine.ipAddress or 'N/A'
        accessUri       :
          label         : 'Assigned URL'
          cssClass      : if isManaged or isAws then 'assigned-url hidden' else 'assigned-url'
          itemClass     : CustomLinkView
          title         : @machine.domain
          href          : accessUri
