diff --git a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl index f6197ee2c..8b3b9b3e0 100644 --- a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl @@ -40,7 +40,17 @@ $("a#upload_file_import_link").fancybox({ 'titleShow' : false, 'transitionIn' : 'elastic', - 'transitionOut' : 'elastic', + 'transitionOut' : 'elastic' + }); + + $('#preview_import').submit(function(e) { + if ($('#truncate').get(0).checked) + { + if (!confirm('{l s='Are you sure you want to delete' js=1}' + ' ' + $.trim($('#entity > option:selected').text().toLowerCase()) + '{l s='?' js=1}')) + { + e.preventDefault(); + } + } }); }); @@ -50,20 +60,6 @@ splitTitle: '|', showTitle: false }); - - $('#preview_import').submit(function() { - if ($('#truncate').get(0).checked) - { - if (confirm('{l s='Are you sure you want to delete' js=1}' + ' ' + $.trim($('#entity > option:selected').text().toLowerCase()) + '{l s='?' js=1}')) - { - return true; - } - else - { - return false; - } - } - }); }; diff --git a/js/admin-products.js b/js/admin-products.js index 8a4a0f2b5..7e5b00475 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -401,7 +401,6 @@ function enableSave() function handleSaveButtons(e) { - //product_type = $("input[name=type_product]:checked").val(); msg = []; var i = 0; // relative to type of product @@ -413,7 +412,6 @@ function handleSaveButtons(e) msg[i++] = handleSaveButtonsForSimple(); // common for all products - // name[defaultlangid] $("#disableSaveMessage").remove(); if ($("#name_"+defaultLanguage).val() == "" && (!display_multishop_checkboxes || $('input[name=\'multishop_check[name]['+defaultLanguage+']\']').prop('checked'))) {