Add the country into the popup with info on company.

This commit is contained in:
Laurent Destailleur 2022-03-26 11:44:36 +01:00
parent bc938d86ba
commit 50847efdf8
2 changed files with 14 additions and 8 deletions

View File

@ -645,17 +645,20 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
$("#select_type").change(function() $("#select_type").change(function()
{ {
setforfree(); setforfree();
if (jQuery('#select_type').val() >= 0)
{ if (jQuery('#select_type').val() >= 0) {
/* focus work on a standard textarea but not if field was replaced with CKEDITOR */ 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(); jQuery('#dp_desc').focus();
/* focus if CKEDITOR */ /* this focus code works for CKEDITOR */
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined") if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined") {
{
var editor = CKEDITOR.instances['dp_desc']; var editor = CKEDITOR.instances['dp_desc'];
if (editor) { editor.focus(); } if (editor) {
editor.focus();
}
} }
} }
console.log("Hide/show date according to product type"); console.log("Hide/show date according to product type");
if (jQuery('#select_type').val() == '0') if (jQuery('#select_type').val() == '0')
{ {

View File

@ -2104,6 +2104,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId6", $mysoc->country_code).'</b>: <span>'.dol_print_profids(getDolGlobalString("MAIN_INFO_PROFID6"), 6).'</span>'; $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId6", $mysoc->country_code).'</b>: <span>'.dol_print_profids(getDolGlobalString("MAIN_INFO_PROFID6"), 6).'</span>';
} }
$dropdownBody .= '<br><b>'.$langs->trans("VATIntraShort").'</b>: <span>'.dol_print_profids(getDolGlobalString("MAIN_INFO_TVAINTRA"), 'VAT').'</span>'; $dropdownBody .= '<br><b>'.$langs->trans("VATIntraShort").'</b>: <span>'.dol_print_profids(getDolGlobalString("MAIN_INFO_TVAINTRA"), 'VAT').'</span>';
$dropdownBody .= '<br><b>'.$langs->trans("Country").'</b>: <span>'.$langs->trans("Country".$mysoc->country_code).'</span>';
$dropdownBody .= '</div>'; $dropdownBody .= '</div>';
@ -2242,7 +2243,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
</div>'; </div>';
} else { } else {
$btnUser = '<!-- div for user link --> $btnUser = '<!-- div for user link -->
<div id="topmenu-login-dropdown" class="userimg atoplogin dropdown user user-menu inline-block"> <div id="topmenu-login-dropdown" class="userimg atoplogin dropdown user user-menu inline-block">
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'"> <a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'">
'.$userImage.' '.$userImage.'
<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span> <span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>
@ -2273,10 +2274,12 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
}); });
$("#topmenulogincompanyinfo-btn").on("click", function() { $("#topmenulogincompanyinfo-btn").on("click", function() {
console.log("Clik on topmenulogincompanyinfo-btn");
$("#topmenulogincompanyinfo").slideToggle(); $("#topmenulogincompanyinfo").slideToggle();
}); });
$("#topmenuloginmoreinfo-btn").on("click", function() { $("#topmenuloginmoreinfo-btn").on("click", function() {
console.log("Clik on topmenuloginmoreinfo-btn");
$("#topmenuloginmoreinfo").slideToggle(); $("#topmenuloginmoreinfo").slideToggle();
});'; });';
} }