             #<img class='avatar-image' src='#{group.avatar or "http://lorempixel.com/#{200+@utils.getRandomNumber(10)}/#{200+@utils.getRandomNumber(10)}"}'/>
             partial : "<div class='image-wrapper'></div>"
             callback :(formData)=>
-
               log 'image data, ready for S3 upload',formData
 
+              for image in formData.images
+                if image
+                  modal.$('.image-wrapper').css backgroundImage : "url(#{image.small})"
+                  modal.modalTabs.forms["General Settings"].addCustomData 'avatar', image.small
               # access data like this. formData.images may have undefined values for some reason
               # for image in formData.images
               #   if image

                ]
    , group

    modal.modalTabs.forms["Avatar"].inputs["Drop Image here"].on 'FileReadComplete', (stuff)->
      # modal.$('img.avatar-image').attr 'src' : stuff.file.data
      modal.$('div.image-wrapper').css backgroundImage : "url(#{stuff.file.data})"

  editPermissions:(group)->
    group.getData().fetchPermissions (err, permissionSet)->
      if err
        new KDNotificationView title: err.message
      else

                        width   : 60
                        height  : 60
                      }
                      # 'blur', {
                      #   radius : 0
                      # }
                    ]
                }
          "General Settings":
