diff --git a/admin-dev/themes/default/template/controllers/products/virtualproduct.tpl b/admin-dev/themes/default/template/controllers/products/virtualproduct.tpl index 0ffbb2fc2..c21a67e9d 100644 --- a/admin-dev/themes/default/template/controllers/products/virtualproduct.tpl +++ b/admin-dev/themes/default/template/controllers/products/virtualproduct.tpl @@ -48,193 +48,193 @@ var fileName = data.getAttribute("filename"); if (result == "error") { - $("#upload-confirmation").hide(); - $("#upload-error td").html('
error: ' + msg + '
'); - else - { - $('#virtual_product_file_attribute').remove(); - $('#virtual_product_file_label').hide(); - $('#file_missing').hide(); - $('#delete_downloadable_product_attribute').show(); - $('#upload-confirmation2').html( - '{l s='The file'} "' + fileName + '" {l s='has successfully been uploaded'}' + - ''); - $('#virtual_product_name_attribute').attr('value', fileName); + var files = $(this)[0].files; + var name = ''; - link = $("#delete_downloadable_product_attribute").attr('href'); - $("#delete_downloadable_product_attribute").attr('href', link+"&file="+msg); - } - } + $.each(files, function(index, value) { + name += value.name+', '; + }); + + $('#virtual_product_file-name').val(name.slice(0, -2)); } - ); - } + else // Internet Explorer 9 Compatibility + { + var name = $(this).val().split(/[\\/]/); + $('#virtual_product_file-name').val(name[name.length-1]); + } + + uploadFile(); + }); + }); - - -
- {$download_product_file_missing} :
- {$smarty.const._PS_DOWNLOAD_DIR_}/{$product->productDownload->filename}
-