removed code related to other pr

This commit is contained in:
azhar bhat
2026-01-15 15:04:53 +05:30
parent 909651a022
commit a6b1d8a6b4
2 changed files with 2 additions and 15 deletions

View File

@@ -85,16 +85,6 @@ class QloHotelReviewDefaultModuleFrontController extends ModuleFrontController
}
}
if (is_array($_FILES) && array_key_exists('images', $_FILES) ) {
$allowedExtensions = array('jpg', 'png');
foreach ($_FILES['images']['name'] as $key => $imageName) {
$extension = Tools::strtolower(pathinfo($imageName, PATHINFO_EXTENSION));
if (!in_array($extension, $allowedExtensions)) {
$errors['general'][] = $imageName . ' ' . $objModule->l('is not a supported image format.','default');
}
}
}
if (!count($errors['by_key']) && !count($errors['general'])) {
$customerReview = QhrHotelReview::getByCustomer(
$objOrder->id_customer,

View File

@@ -147,7 +147,7 @@ var QhrReviewImages = {
reader.readAsDataURL(file);
},
removeFile: function(iInput, iFile) {
var input = $('.images-field input.input-images').eq(iInput);
var input = $('.images-field input.input-images').get(iInput);
var files = $(input).get(0).files;
var dataTransfer = new DataTransfer();
$(files).each(function(iiFile, file) {
@@ -155,10 +155,7 @@ var QhrReviewImages = {
dataTransfer.items.add(file);
}
});
input.get(0).files = dataTransfer.files;
if (input.get(0).files.length === 0) {
input.remove();
}
input.files = dataTransfer.files;
},
resetPreviews: function() {
$('.previews-wrap').html('');