Max filesize: {{maxFilesize}} MB.', dictDefaultMessage : 'Click to chose a file or drag it here', createImageThumbnails:false, success: function (file, response) { this.removeAllFiles(true); if( typeof response.error === 'undefined' || response.error ){ $('.dropzone button.dz-button').html( 'Click to chose a file or drag it here' ); if( typeof response.error_message === 'undefined' ){ $('#file_upload_message').html('
An error occured while trying to upload your file. Please try again.
'); }else{ $('#file_upload_message').html('' + response.error_message + '
'); } temp_notify_flag = 'file-upload-1'; notify_admin('1037' , response.error_message ); }else{ $('#btn_submit').attr('disabled',false ); $('.dropzone button.dz-button').html( 'Your file has been uploaded. Click here to another files.' ); file_uploaded_add_lbl(response.file_name, response.file_hash ); } } ,uploadprogress: function(file, progress, bytesSent) { if (file.previewElement) { if( progress < 100 ){ $('.dropzone button.dz-button').text( 'Uploading... ' + Math.round( progress ) + "%" ); }else{ $('.dropzone button.dz-button').text( 'Processing... ' ); } } } ,maxfilesexceeded: function (file, response) { $('#file_upload_message').html( 'Please Note: Only one file can be uploaded at a time. You can add additional files above.
' ); $('#btn_submit').attr('disabled',false ); } ,processing: function (file, response) { $('.dropzone button.dz-button').text( 'Uploading...' ); $('#btn_submit').attr('disabled',true );/*.val('here');*/ } ,error: function (file, response) { file.previewElement.classList.add("dz-error"); console.log( response ); temp_notify_flag = 'dz-error'; notify_admin('1096' , response ); $('.dropzone button.dz-button').html( 'Click to chose a file or drag it here' ); /*$('#file_upload_message').html('' + response + '
');*/ $('#file_upload_message').html(response == '' ? 'An error occurred while trying to submit your website request. Our admins have been notified. We apologize for any inconvenience.
' : response ); $('#btn_submit').attr('disabled',false ); } ,removedfile: function(file) { file.previewElement.remove(); $('#btn_submit').attr('disabled',false ); } ,init: function () { /*console.log( 'init: ' + this.files.length );*/ this.on("addedfile", function(file) { $('#file_upload_message').html('');});/**/ } }); }); function file_uploaded_add_lbl(f,h){ console.log( f ); if (typeof f === 'undefined') {return} if($('#file_upload_file_list').html() == '' )$('#file_upload_file_list').html('