diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index b09a33f44f6..17683562be5 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -645,17 +645,20 @@ if (!empty($usemargins) && $user->rights->margins->creer) { $("#select_type").change(function() { setforfree(); - if (jQuery('#select_type').val() >= 0) - { - /* focus work on a standard textarea but not if field was replaced with CKEDITOR */ + + if (jQuery('#select_type').val() >= 0) { + console.log("Set focus on description field"); + /* this focus code works on a standard textarea but not if field was replaced with CKEDITOR */ jQuery('#dp_desc').focus(); - /* focus if CKEDITOR */ - if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined") - { + /* this focus code works for CKEDITOR */ + if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined") { var editor = CKEDITOR.instances['dp_desc']; - if (editor) { editor.focus(); } + if (editor) { + editor.focus(); + } } } + console.log("Hide/show date according to product type"); if (jQuery('#select_type').val() == '0') { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 51a7dcfafcb..fe0986e8d13 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2104,6 +2104,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $dropdownBody .= '
'.$langs->transcountry("ProfId6", $mysoc->country_code).': '.dol_print_profids(getDolGlobalString("MAIN_INFO_PROFID6"), 6).''; } $dropdownBody .= '
'.$langs->trans("VATIntraShort").': '.dol_print_profids(getDolGlobalString("MAIN_INFO_TVAINTRA"), 'VAT').''; + $dropdownBody .= '
'.$langs->trans("Country").': '.$langs->trans("Country".$mysoc->country_code).''; $dropdownBody .= ''; @@ -2242,7 +2243,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') '; } else { $btnUser = ' -