From fbb7f9afa7b8ee3f0a6ee79d93b1ca60535f2112 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 16 Dec 2011 09:12:12 +0000 Subject: [PATCH] // update virtual_product.tpl in AdminProductsController --- admin-dev/themes/template/products/form.tpl | 12 +- .../themes/template/products/informations.tpl | 144 +++--------------- .../template/products/virtualproduct.tpl | 48 +++--- 3 files changed, 55 insertions(+), 149 deletions(-) diff --git a/admin-dev/themes/template/products/form.tpl b/admin-dev/themes/template/products/form.tpl index abc8d3cf6..7d172c0d7 100644 --- a/admin-dev/themes/template/products/form.tpl +++ b/admin-dev/themes/template/products/form.tpl @@ -81,13 +81,13 @@ $(document).ready(function(){ {if $is_pack} - $('#pack_product').attr("checked", "checked"); + $('#pack_product').attr('checked', 'checked'); $('li.tab-row a[id*="VirtualProduct"]').hide(); {elseif $product->is_virtual} - $('#virtual_product').attr("checked", "checked"); + $('#virtual_product').attr('checked', 'checked'); $('li.tab-row a[id*="Pack"]').hide(); {else} - $('#simple_product').attr("checked", "checked"); + $('#simple_product').attr('checked', 'checked'); $('li.tab-row a[id*="Pack"]').hide(); $('li.tab-row a[id*="VirtualProduct"]').hide(); {/if} @@ -99,10 +99,14 @@ if (val == 1) $('li.tab-row a[id*="Pack"]').show(); else if (val == 2) + { $('li.tab-row a[id*="VirtualProduct"]').show(); + $('#is_virtual_good').attr('checked', true).attr('disabled', 'disabled'); + $('#virtual_good').show(); + } else { - $('#is_virtual_good').removeAttr("checked"); + $('#is_virtual_good').removeAttr('checked'); $('#is_virtual').val(0); } }); diff --git a/admin-dev/themes/template/products/informations.tpl b/admin-dev/themes/template/products/informations.tpl index 65b2bbcad..123a78037 100644 --- a/admin-dev/themes/template/products/informations.tpl +++ b/admin-dev/themes/template/products/informations.tpl @@ -78,8 +78,27 @@ $('#mvt_sign').show(); } -
-
+
+ +
+ + + + +
+
+ +
+
{* global information *} @@ -205,119 +224,6 @@
- -
- - - - - - -
-

is_virtual && $product->productDownload->active}checked="checked"{/if} /> - -

- {* [begin] virtual product *} -
productDownload->id || $product->productDownload->active}style="display:none"{/if} > - - - - - -
-
{l s='Does this product has an associated file ?'}
- {l s='Yes'} - {l s='No'}

- {if $download_product_file_missing} -

- {$download_product_file_missing} :
- {$smarty.const._PS_DOWNLOAD_DIR_}/{$product->productDownload->filename}
-

- {/if} -
- -
- - -
-
-

- - - -

-

- - {l s='Format: YYYY-MM-DD'} - -

-

- - * - -

-

- - productDownload->is_shareable}checked="checked"{/if} /> - -

-
- {else} -
{l s='You used combinations, for this reason you can\'t edit your file here, but in the Combinations tab'}
-
- {$error_product_download} - {/if} -
-
-
@@ -458,10 +364,6 @@ var textFieldLabel = 0;
-
+
-{* - - *} + diff --git a/admin-dev/themes/template/products/virtualproduct.tpl b/admin-dev/themes/template/products/virtualproduct.tpl index 282040f7e..361af4184 100644 --- a/admin-dev/themes/template/products/virtualproduct.tpl +++ b/admin-dev/themes/template/products/virtualproduct.tpl @@ -33,50 +33,50 @@ var customizationTextFieldNumber = '{$product->text_fields}'; var uploadableFileLabel = 0; var textFieldLabel = 0; - - $("#is_virtual_good").change(function(e) { - $("#virtual_good").toggle(); + + $('#is_virtual_good').change(function(e) { + $('#virtual_good').toggle(); }); - if ($("#is_virtual_good").attr("checked")) + if ($('#is_virtual_good').attr('checked')) { - $("#virtual_good").show(); - $("#virtual_good_more").show(); + $('#virtual_good').show(); + $('#virtual_good_more').show(); } - if ( $("input[name=is_virtual_file]:checked").val() == 1) + if ( $('input[name=is_virtual_file]:checked').val() == 1) { - $("#virtual_good_more").show(); - $("#virtual_good_attributes").show(); - $("#is_virtual_file_product").show(); + $('#virtual_good_more').show(); + $('#virtual_good_attributes').show(); + $('#is_virtual_file_product').show(); } else { - $("#virtual_good_more").hide(); - $("#virtual_good_attributes").hide(); - $("#is_virtual_file_product").hide(); + $('#virtual_good_more').hide(); + $('#virtual_good_attributes').hide(); + $('#is_virtual_file_product').hide(); } - $("input[name=is_virtual_file]").live("change", function() { + $('input[name=is_virtual_file]').live('change', function() { if($(this).val() == "1") { - $("#virtual_good_more").show(); - $("#virtual_good_attributes").show(); - $("#is_virtual_file_product").show(); + $('#virtual_good_more').show(); + $('#virtual_good_attributes').show(); + $('#is_virtual_file_product').show(); } else { - $("#virtual_good_more").hide(); - $("#virtual_good_attributes").hide(); - $("#is_virtual_file_product").hide(); + $('#virtual_good_more').hide(); + $('#virtual_good_attributes').hide(); + $('#is_virtual_file_product').hide(); } }); - $("input[name=is_virtual_good]").live("change", function() { - if($(this).attr("checked")) - $("#is_virtual").val(1); + $('input[name=is_virtual_good]').live('change', function() { + if($(this).attr('checked')) + $('#is_virtual').val(1); else - $("#is_virtual").val(0); + $('#is_virtual').val(0); }); $(document).ready(function() {