           </div>
           <input id="channel_id_<%= channel_id %>" name="channel_id[<%= channel_id %>]" type="hidden"/>
           <input id="file" name="file" type="file"/>
-          <div class="dropzone">Drop files here to upload</div>
+          <div class="dropzone"><%= dropzoneText %></div>
       </form>
     '''
 



      uploadFinished: (i, file, response, time)->
        $(".dropzone").text("Drop files here to upload")
        Kandan.Widgets.render "Kandan.Plugins.Attachments"

      progressUpdated: (i, file, progress)->
        # TODO update dropzone text

      dragOver: ->
        console.log "reached dropzone!"
    })

  @init: ()->
    Kandan.Widgets.register @plugin_namespace
    Kandan.Data.Channels.register_callback "change", ()=>
      Kandan.Widgets.render @plugin_namespace


# Kandan.Plugins.register "Kandan.Plugins.Attachments"

  @widget_icon_url: "/assets/media_icon.png"
  @plugin_namespace: "Kandan.Plugins.Attachments"

  @dropzoneInit: false

  @options:
    maxFileNameLength: 20
    defaultDropzoneText: "Drop file here to upload"

  @templates:
    no_files: _.template '''
