     isPrivateGroup = 'private' is group.privacy
 
     _updateGroupHandler =(group, formData)=>
-      log formData
-      formData.avatar = @customUrl if @customUrl
-      log formData
       group.modify formData, (err)->
         if err
           new KDNotificationView


    @settingsForm = new KDFormViewWithFields formOptions, @getData()

    avatarUploadView = @settingsForm.inputs["Avatar"]
    avatarUploadView.on 'FileReadComplete', ({file, progressEvent})->
      log 'read'
      avatarUploadView.$('.kdfileuploadarea').css
        backgroundImage : "url(#{file.data})"
      avatarUploadView.$('span').addClass 'hidden'

    avatarUploadView.on 'FileUploadComplete', (res)=>
      log 'upload',res
      if res.length and res[0].resource
        @customUrl = res[0].resource

    # avatarUploadView.on 'FileUploadComplete', (files)->
    #   for {filename, resource} in files
    #     console.log {filename, resource}



  viewAppended:->
    super


            diameter        : 16
          callback          : -> modal.destroy()
      fields:
        Title               :
          label             : "Group Name"
          itemClass         : KDInputView
