 
     modal.createButton "cancel",style : "modal-cancel", callback : @destroyModal
     modal.addSubView helpBox = new HelpBox, ".kdmodal-buttons"
-
-
-
 
   destroyModal:=>
     @modal.destroy()

        item.on "change",(event,value)->
          # log value,s3Form,form
          switch value
            when "ftp","sftp","webdav"
              lines.hostname.show()
              lines.username.show()
              lines.password.show()
              lines.port.show()
              lines.accessKey.hide()
              lines.secret.hide()
            when "s3"
              lines.accessKey.show()
              lines.secret.show()
              lines.hostname.hide()
              lines.username.hide()
              lines.password.hide()
              lines.port.hide()

      lines = {}
      form = new KDFormView

          name        : "type"
          defaultValue: if data then data.type else "ftp"
          selectOptions : [
            # { title : "Select mount type...", value : "none" }
            { title : "FTP",                  value : "ftp" }
            { title : "SFTP",                 value : "sftp" }
            # { title : "S3",                   value : "s3" }
            # { title : "WebDAV",               value : "webdav" }
            # { title : "Dropbox",              value : "dropbox" }
          ]

      # title :
      #   label : new KDLabelView
      #     title : "Title:"
      #   input: new KDInputView
      #     name        : "title"
      #     placeholder : "give it a name if you like..."
      #     defaultValue: data.title if data

      hostname :
        label :  new KDLabelView
