Mails + Upload

This commit is contained in:
Kevin Adametz 2020-06-14 13:49:11 +02:00
parent 767e84e640
commit a3bef8d1aa
19 changed files with 151 additions and 200 deletions

View file

@ -34,6 +34,15 @@
<script type="text/javascript">
var responseReaload = false;
$('#modals-load-content').on('hide.bs.modal', function (event) {
$(this).off('hide.bs.modal');
if(responseReaload){
responseReaload = false;
window.location.reload();
}
});
$( document ).ready(function() {
Dropzone.autoDiscover = false;
$("#uploadBookingFile").dropzone({
@ -75,15 +84,18 @@
message = response.message;
var _ele = $('.alert-danger');
_ele.fadeIn();
console.log(message);
$(file.previewElement).find('.dz-error-message').text(message);
$(file.previewElement).addClass('dz-error');
_ele.text(message);
},
success: function(file, response) {
console.log(file);
console.log(response);
// console.log(file);
// console.log(response);
$(file.previewElement).addClass('dz-success');
if(response.error === false){
responseReaload = true;
//window.location.href = window.location.href; //This is a possibility
window.location.reload(); //Another possiblity
// window.location.reload(); //Another possiblity
}
}
});