add payments by invoice
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
@if(!defined('LOAD_FILEINPUT'))
|
||||
@if (!defined('LOAD_FILEINPUT'))
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="/assets/plugins/bootstrap-fileinput/css/fileinput.min.css">
|
||||
@endpush
|
||||
@push('scripts')
|
||||
<script src="/assets/plugins/bootstrap-fileinput/js/fileinput.min.js"></script>
|
||||
@if(App::getLocale() !== 'en')
|
||||
@if (App::getLocale() !== 'en')
|
||||
<script src="/assets/plugins/bootstrap-fileinput/js/locales/{{ App::getLocale() }}.js"></script>
|
||||
<script src="/assets/plugins/bootstrap-fileinput/themes/fas/theme.min.js"></script>
|
||||
<script>
|
||||
$.fn.fileinput.defaults.language = '{{ App::getLocale() }}';
|
||||
</script>
|
||||
@@ -17,41 +16,44 @@
|
||||
// console.log(options);
|
||||
var selector = (typeof(sel) == 'undefined') ? '.fileinput' : sel;
|
||||
$(selector).fileinput(options)
|
||||
.on("filebatchselected", function(event, files) {
|
||||
$(selector).fileinput("upload");
|
||||
}).on('fileuploaded', function (event, data, previewId, index, fileId) {
|
||||
// console.log('File uploaded', previewId, index, fileId);
|
||||
var file = data.files[0];
|
||||
// console.log(file);
|
||||
var response = data.response.initialPreviewConfig.extra;
|
||||
// console.log(response);
|
||||
.on("filebatchselected", function(event, files) {
|
||||
$(selector).fileinput("upload");
|
||||
}).on('fileuploaded', function(event, data, previewId, index, fileId) {
|
||||
// console.log('File uploaded', previewId, index, fileId);
|
||||
var file = data.files[0];
|
||||
// console.log(file);
|
||||
var response = data.response.initialPreviewConfig.extra;
|
||||
// console.log(response);
|
||||
|
||||
response.model = $(this).data('model');
|
||||
response.model = $(this).data('model');
|
||||
|
||||
// console.log(response);
|
||||
if (typeof(callbackUploaded) !== 'undefined') {
|
||||
// console.log('Callback');
|
||||
eval(callbackUploaded);
|
||||
}
|
||||
}).on('filebatchuploadcomplete', function(event, preview, config, tags, extraData) {
|
||||
console.log('File Batch Uploaded', preview, config, tags, extraData);
|
||||
}).on('filebatchuploadsuccess', function(event, data) {
|
||||
console.log('File batch upload success');
|
||||
console.log(data);
|
||||
}).on('fileuploaderror', function(event, data, msg) {
|
||||
console.log('File upload error');
|
||||
console.log(data);
|
||||
console.log(msg);
|
||||
});
|
||||
// console.log(response);
|
||||
if (typeof(callbackUploaded) !== 'undefined') {
|
||||
// console.log('Callback');
|
||||
eval(callbackUploaded);
|
||||
}
|
||||
}).on('filebatchuploadcomplete', function(event, preview, config, tags, extraData) {
|
||||
console.log('File Batch Uploaded', preview, config, tags, extraData);
|
||||
}).on('filebatchuploadsuccess', function(event, data) {
|
||||
console.log('File batch upload success');
|
||||
console.log(data);
|
||||
}).on('fileuploaderror', function(event, data, msg) {
|
||||
console.log('File upload error');
|
||||
console.log(data);
|
||||
console.log(msg);
|
||||
});
|
||||
}
|
||||
|
||||
function UploadOptions(options) {
|
||||
return {
|
||||
allowedFileExtensions: (typeof(options.allowedFileExtensions) == 'undefined') ? ['doc','docx','jpg','jpeg','png','xls','xlsx','pdf'] : options.allowedFileExtensions,
|
||||
allowedFileExtensions: (typeof(options.allowedFileExtensions) == 'undefined') ? ['doc', 'docx', 'jpg',
|
||||
'jpeg', 'png', 'xls', 'xlsx', 'pdf'
|
||||
] : options.allowedFileExtensions,
|
||||
browseOnZoneClick: (typeof(options.browseOnZoneClick) == 'undefined') ? true : options.browseOnZoneClick,
|
||||
dropZoneEnabled: (typeof(options.dropZoneEnabled) == 'undefined') ? false : options.dropZoneEnabled,
|
||||
initialPreview: (typeof(options.initialPreview) == 'undefined') ? false : options.initialPreview,
|
||||
initialPreviewAsData: (typeof(options.initialPreviewAsData) == 'undefined') ? false : options.initialPreviewAsData,
|
||||
initialPreviewAsData: (typeof(options.initialPreviewAsData) == 'undefined') ? false : options
|
||||
.initialPreviewAsData,
|
||||
maxFilesize: (typeof(options.maxFilesize) == 'undefined') ? false : options.maxFilesize,
|
||||
overwriteInitial: (typeof(options.overwriteInitial) == 'undefined') ? false : options.overwriteInitial,
|
||||
showCaption: (typeof(options.showCaption) == 'undefined') ? true : options.showCaption,
|
||||
@@ -117,8 +119,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function initFileInputImage(images, sel)
|
||||
{
|
||||
function initFileInputImage(images, sel) {
|
||||
UploadInit(sel, {
|
||||
allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
|
||||
overwriteInitial: true,
|
||||
@@ -131,8 +132,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function uploadShowImage(id, image)
|
||||
{
|
||||
function uploadShowImage(id, image) {
|
||||
$('#' + id + '_preview').toggleClass('d-none');
|
||||
$('#' + id + '_preview').find('img').attr('src', image);
|
||||
$('#' + id + '_uploader').toggleClass('d-none');
|
||||
|
||||
Reference in New Issue
Block a user