diff --git a/resources/views/modules/usulan/kriteria/form.blade.php b/resources/views/modules/usulan/kriteria/form.blade.php index c410a3a..714284d 100644 --- a/resources/views/modules/usulan/kriteria/form.blade.php +++ b/resources/views/modules/usulan/kriteria/form.blade.php @@ -118,48 +118,48 @@ @endif // $('.dropzone').on('click',function(){ // Dropzone.autoDiscover = false; // Penting supaya tidak auto-initialize! - const myDropzone = new Dropzone(".dropzone", { - url: "{{ url('uploadTemp') }}", // URL ke controller kamu - method: "POST", - headers: { - 'X-CSRF-TOKEN': "{{csrf_token()}}" - }, - xhrFields: { - withCredentials: true - }, - // maxFilesize: 1, // dalam MB - acceptedFiles: ".pdf", - paramName: "file", // nama input file yang dikirim ke controller - uploadMultiple: true, - init: function() { - this.on("successmultiple", function(files, response) { - // console.log('Upload success multiple:', response); + // const myDropzone = new Dropzone(".dropzone", { + // url: "{{ url('uploadTemp') }}", // URL ke controller kamu + // method: "POST", + // headers: { + // 'X-CSRF-TOKEN': "{{csrf_token()}}" + // }, + // xhrFields: { + // withCredentials: true + // }, + // // maxFilesize: 1, // dalam MB + // acceptedFiles: ".pdf", + // paramName: "file", // nama input file yang dikirim ke controller + // uploadMultiple: true, + // init: function() { + // this.on("successmultiple", function(files, response) { + // // console.log('Upload success multiple:', response); - const fileList = document.getElementById('file-list'); + // const fileList = document.getElementById('file-list'); - response.files.forEach(function(fileInfo) { - const li = document.createElement('li'); - li.innerHTML = `${fileInfo.filename}`; - fileList.appendChild(li); + // response.files.forEach(function(fileInfo) { + // const li = document.createElement('li'); + // li.innerHTML = `${fileInfo.filename}`; + // fileList.appendChild(li); - // Tambahkan ke hidden input kalau perlu - const hiddenInput = document.createElement('input'); - hiddenInput.type = 'hidden'; - hiddenInput.name = 'input_upload_files[]'; - hiddenInput.value = fileInfo.filename; - hiddenInput.class = 'removeFormKriteria'; - var elem = ''; - $('.changeForm').append(elem); - }); - }); + // // Tambahkan ke hidden input kalau perlu + // const hiddenInput = document.createElement('input'); + // hiddenInput.type = 'hidden'; + // hiddenInput.name = 'input_upload_files[]'; + // hiddenInput.value = fileInfo.filename; + // hiddenInput.class = 'removeFormKriteria'; + // var elem = ''; + // $('.changeForm').append(elem); + // }); + // }); - this.on("error", function(file, response) { - console.error('Upload error:', response); - toastr.error(response, 'Error!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'}); - this.removeFile(file); - }); - } - }); + // this.on("error", function(file, response) { + // console.error('Upload error:', response); + // toastr.error(response, 'Error!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'}); + // this.removeFile(file); + // }); + // } + // }); // });