@if (isset($pond_banner))
const existingBanner = [
@if (isset($data->account_information->banner))
{
source: "{{ asset($data->account_information->banner) }}",
},
@endif
];
// banner file
const inputBanner = document.querySelector('.filepond-banner');
const pondBanner = FilePond.create(inputBanner, {
labelIdle: "{{ __('site.Product.Product_11') }} {{ __('site.Product.Product_12') }}",
instantUpload: false, // تعطيل الرفع التلقائي للملفات
allowProcess: false, // تعطيل المعالجة التلقائية
files: existingBanner
});
pondBanner.setOptions({
maxFiles: 1,
server: {
process: (fieldName, file, metadata, load, error, progress, abort) => {
// نحتاج فقط لرفع الملفات عند تقديم النموذج، لذا لا حاجة هنا
}
},
});
@endif
@if (isset($pond_logo))
const existingLogo = [
@if (isset($data->account_information->logo))
{
source: "{{ asset($data->account_information->logo) }}",
},
@endif
];
// FilePond.registerPlugin();
const inputElement = document.querySelector('.filepond-logo');
const pondLogo = FilePond.create(inputElement, {
labelIdle: "{{ __('site.Product.Product_11') }} {{ __('site.Product.Product_12') }}",
instantUpload: false, // تعطيل الرفع التلقائي للملفات
allowProcess: false, // تعطيل المعالجة التلقائية
files: existingLogo
});
// تعطيل الرفع التلقائي وجمع الملفات
pondLogo.setOptions({
maxFiles: 1,
server: {
process: (fieldName, file, metadata, load, error, progress, abort) => {
// نحتاج فقط لرفع الملفات عند تقديم النموذج، لذا لا حاجة هنا
}
},
});
@endif