removed code related to other pr
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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('');
|
||||
|
||||
Reference in New Issue
Block a user