diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 3ca6acafba59..26b42a0bd90b 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -998,47 +998,59 @@ }) // Initialize document upload - dropzone = new Dropzone('#document-upload .dropzone', { - url:{!! json_encode(url('document')) !!}, - params:{ - _token:"{{ Session::getToken() }}" - }, - acceptedFiles:{!! json_encode(implode(',',\App\Models\Document::$allowedMimes)) !!}, - addRemoveLinks:true, - @foreach(['default_message', 'fallback_message', 'fallback_text', 'file_too_big', 'invalid_file_type', 'response_error', 'cancel_upload', 'cancel_upload_confirmation', 'remove_file'] as $key) - "dict{{Utils::toClassCase($key)}}":"{{trans('texts.dropzone_'.$key)}}", - @endforeach - maxFileSize:{{floatval(MAX_DOCUMENT_SIZE/1000)}}, - }); - if(dropzone instanceof Dropzone){ - dropzone.on("addedfile",handleDocumentAdded); - dropzone.on("removedfile",handleDocumentRemoved); - dropzone.on("success",handleDocumentUploaded); - for (var i=0; i