$(document).ready(function() { 
    $('.file_upload_bt .file-upload, .file_upload_bt_cs .file-upload_cs, .file_upload_bt_cs .file_drop_cs, .file_upload_bt .file_drop').click(function(){
           $('.dz-clickable').trigger('click');
      });
    // Dropzone class:
   // var myDropzone = new Dropzone("div#block_upload", {url: "/bids/bid/upload-files", maxFiles: 1});
    Dropzone.options.blockUpload = {
        url: "/bids/bid/upload-files",
        maxFiles: 4,
        addRemoveLinks: true,
        dictRemoveFile: 'Удалить',
        success: function(first, response) 
        {
            $('#files-zone').append('<input type="hidden" name="Bid[file][]" value="'+response.filename+'" />');
            $('.file_drop').hide();
            $('.file_drop_cs').hide();
            $('.file_upload_bt_cs').hide();
            $('.file_upload_bt').hide();
        },
    };
}); 