diff --git a/admin-dev/themes/default/template/helpers/form/assoshop.tpl b/admin-dev/themes/default/template/helpers/form/assoshop.tpl index 005e658e1..4792c15a3 100644 --- a/admin-dev/themes/default/template/helpers/form/assoshop.tpl +++ b/admin-dev/themes/default/template/helpers/form/assoshop.tpl @@ -54,11 +54,15 @@ $().ready(function() { function check_group_shop_status(id_group) { var groupChecked = true; + var total = 0; $('.input_shop[value='+id_group+']').each(function(k, v) { + total++; if (!$(v).attr('checked')) groupChecked = false; }); - $('.input_group_shop[value='+id_group+']').attr('checked', groupChecked); + + if (total > 0) + $('.input_group_shop[value='+id_group+']').attr('checked', groupChecked); } function check_all_shop() { @@ -93,7 +97,7 @@ function check_all_shop() {