| Server IP : 46.62.235.243 / Your IP : 216.73.216.217 Web Server : Apache/2.4.58 (Ubuntu) System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/linkabili/storage/framework/views/ |
Upload File : |
<div class="row">
<div class="col-lg-12">
<div class="row">
<div class="col-12 text-right">
<a class="btn btn-primary" style="cursor:pointer; color:white" aria-selected="false"
data-toggle="modal" data-domid="certification_url" onclick="openModal()">Aggiungi Certificato</a>
</div>
</div>
<?php $__currentLoopData = $certifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $certification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div
class="p-5 row cert <?php if(searchPathCertificate($certification->id, $user->certifications)==''): ?> hidden-certification <?php endif; ?>"
id="row_certification_<?php echo e($certification->id); ?>">
<div class="col-lg-8">
<div class="form-group">
<label for="name" class="col-md-12 col-form-label ">Certificato<br> <?php echo e($certification->name); ?>
</label>
<input type="hidden" readonly="" class="form-control" name="certification_name[]"
value="<?php echo e($certification->id ?? ''); ?>">
</div>
</div>
<div class="col-lg-4 hidden-certification-button">
<div class="input-group mb-3">
<input type="text" style="display: none" readonly=""
id='path_certification_<?php echo e($certification->id); ?>' class="form-control"
name="certification_path[]"
value="<?php echo e(searchPathCertificate($certification->id,$user->certifications)); ?>">
<div class="input-group-append">
<button type="button" class="m-2 btn btn-danger removeRowCertification"
data-toggle="modal" data-target="#modalRemove" onclick="updateRemoveID('<?php echo e(searchPathCertificate($certification->id,$user->certifications)); ?>', '<?php echo e($certification->id); ?>')">
Rimuovi
</button>
<a target="_blank"
href="/upload/certification/<?php echo e(searchPathCertificate($certification->id,$user->certifications)); ?>"
type="button" class="m-2 btn btn-success" style="color:white">Visualizza</a>
</div>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<div class="row">
<div class="col-12">
<div class="alert alert-primary" role="alert">
Dopo aver aggiunto il certificato ricordati di salvare le modifiche
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalRemove" tabindex="-1" role="dialog" aria-labelledby="modalRemove" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalRemove">Conferma</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Sei sicuro?
<input id="removeId" type="hidden" value="">
<input id="removePath" type="hidden" value="">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<button onclick="removeRowCertification()" type="button" class="btn btn-primary" data-dismiss="modal">Si</button>
</div>
</div>
</div>
</div>
<?php $__env->startPush('footersection'); ?>
<script>
function updateRemoveID(path, id){
document.getElementById('removeId').value = id;
document.getElementById('removePath').value = path;
}
function removeRowCertification() {
const id = document.getElementById('removeId').value ?? null;
const path = document.getElementById('removePath').value ?? null;
if(id){
$.post('/images/certification-delete', {id: path}, function (date) {
console.log(date.error, date.error === 0, date.error == 0)
if (date.error == 0)
$('#row_certification_' + id).remove();
});
}
}
var counter = 0;
$(function () {
$('.onboarding-error').hide();
$("table.shipping-settings").on("click", ".ibtnDel", function (event) {
$(this).closest("tr").remove();
counter--;
});
$("#recipient_type").change(function () {
saveTextRecipients($(this).val());
});
});
function openModal(id) {
$('#uploadProductVideo').modal();
}
$(function () {
$('.certifications').select2();
$.ajax({
url: '/ajax/ajaxGetCertification',
method: "GET",
dataType: 'json',
success: function (response, status) {
$('.certifications').empty().trigger("change");
$.each(response.data, function (key, val) {
newOption_website = new Option(val.name, val.id, false, false);
$('.certifications').append(newOption_website);
});
}
});
$('#file_certification').on('change', function () {
$('.onboarding-error > .alert-danger').text('');
$('.onboarding-error').hide();
var formDataUploadCert = new FormData($("#file_form_certification")[0]);
//var nameFile = $('#file_image')[0].files[0].name;
var typeFile = $('#file_certification')[0].files[0].type;
var sizeFile = $('#file_certification')[0].files[0].size;
//console.log(typeFile);
if (sizeFile > 2000000) {
$('.onboarding-error').show();
$('.onboarding-error > .alert-danger').text('File troppo grande, il limite massimo รจ di 2MB');
return false;
}
formDataUploadCert.append('certification_form', $('#certification_form').val());
console.log(formDataUploadCert);
$.ajax({
url: '/images/certification-save',
data: formDataUploadCert,
method: "POST",
dataType: 'json',
contentType: false,
processData: false,
success: function (risp) {
if (!risp.error) {
$('#path_certification_' + risp.id).val(risp.file_name);
$('#row_certification_' + risp.id).removeClass('hidden-certification');
$('#row_certification_' + risp.id + ' .hidden-certification-button').hide();
} else {
alert(risp.error);
}
},
complete: function () {
//$('#file_certification').val('').trigger("reset");
$('#image_preview_loader').addClass('hidden');
$("#uploadProductVideo").trigger("click");
}
});
});
});
</script>
<?php $__env->stopPush(); ?>
<?php /**PATH /var/www/linkabili/resources/views/frontend/profile/components/certifications.blade.php ENDPATH**/ ?>