diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index cf512d5f173..f5024b5cb71 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -8377,18 +8377,18 @@ class Form
* Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter.
* Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice.
*
- * @param string $htmlname Name of html select area
- * @param array $array Array (key=>array('text'=>'A text', 'url'=>'An url'), ...)
- * @param string $id Preselected key
- * @param string $moreparam Add more parameters onto the select tag
- * @param int $disableFiltering If set to 1, results are not filtered with searched string
- * @param int $disabled Html select box is disabled
- * @param int $minimumInputLength Minimum Input Length
- * @param string $morecss Add more class to css styles
- * @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected.
- * @param string $placeholder String to use as placeholder
- * @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect)
- * @return string HTML select string
+ * @param string $htmlname Name of html select area
+ * @param array $array Array (key=>array('text'=>'A text', 'url'=>'An url'), ...)
+ * @param string $id Preselected key
+ * @param string $moreparam Add more parameters onto the select tag
+ * @param int $disableFiltering If set to 1, results are not filtered with searched string
+ * @param int $disabled Html select box is disabled
+ * @param int $minimumInputLength Minimum Input Length
+ * @param string $morecss Add more class to css styles
+ * @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected.
+ * @param string $placeholder String to use as placeholder
+ * @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect)
+ * @return string HTML select string
* @see selectArrayAjax(), ajax_combobox() in ajax.lib.php
*/
public static function selectArrayFilter($htmlname, $array, $id = '', $moreparam = '', $disableFiltering = 0, $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0)
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 0e10bb06f2a..e4263d1a217 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -199,9 +199,7 @@ Hide=Hide
ShowCardHere=Show card
Search=Search
SearchOf=Search
-SearchMenuShortCut=Ctrl + shift + f
QuickAdd=Quick add
-QuickAddMenuShortCut=Ctrl + shift + l
Valid=Valid
Approve=Approve
Disapprove=Disapprove
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index 619dde3f5a1..f4ffbb16ff7 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -199,9 +199,7 @@ Hide=Cacher
ShowCardHere=Voir la fiche ici
Search=Rechercher
SearchOf=Recherche de
-SearchMenuShortCut=Ctrl + Maj + f
QuickAdd=Création rapide
-QuickAddMenuShortCut=Ctrl + Maj + l
Valid=Valider
Approve=Approuver
Disapprove=Désapprouver
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 817c7cae698..f71955af2aa 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -2081,12 +2081,21 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') {
$logouthtmltext .= $langs->trans("Logout").'
';
+ $stringforfirstkey = $langs->trans("KeyboardShortcut");
+ if ($conf->browser->name == 'chrome') {
+ $stringforfirstkey .= ' ALT +';
+ } elseif ($conf->browser->name == 'firefox') {
+ $stringforfirstkey .= ' ALT + SHIFT +';
+ } else {
+ $stringforfirstkey .= ' CTL +';
+ }
+
$logouttext .= '';
- $logouttext .= img_picto($langs->trans('Logout'), 'sign-out', '', false, 0, 0, '', 'atoplogin valignmiddle');
+ $logouttext .= img_picto($langs->trans('Logout').' ('.$stringforfirstkey.' l)', 'sign-out', '', false, 0, 0, '', 'atoplogin valignmiddle');
$logouttext .= '';
} else {
$logouthtmltext .= $langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]);
- $logouttext .= img_picto($langs->trans('Logout'), 'sign-out', '', false, 0, 0, '', 'atoplogin valignmiddle opacitymedium');
+ $logouttext .= img_picto($langs->trans('Logout').' ('.$stringforfirstkey.' l)', 'sign-out', '', false, 0, 0, '', 'atoplogin valignmiddle opacitymedium');
}
}
@@ -2368,11 +2377,22 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
$urllogout = DOL_URL_ROOT.'/user/logout.php?token='.newToken();
}
+ // accesskey is for Windows or Linux: ALT + key for chrome, ALT + SHIFT + KEY for firefox
+ // accesskey is for Mac: CTRL + key for all browsers
+ $stringforfirstkey = $langs->trans("KeyboardShortcut");
+ if ($conf->browser->name == 'chrome') {
+ $stringforfirstkey .= ' ALT +';
+ } elseif ($conf->browser->name == 'firefox') {
+ $stringforfirstkey .= ' ALT + SHIFT +';
+ } else {
+ $stringforfirstkey .= ' CTL +';
+ }
+
// Defined the links for bottom of card
- $profilLink = ' '.$langs->trans("Card").'';
+ $profilLink = ' '.$langs->trans("Card").'';
$urltovirtualcard = '/user/virtualcard.php?id='.((int) $user->id);
- $virtuelcardLink = dolButtonToOpenUrlInDialogPopup('publicvirtualcardmenu', $langs->trans("PublicVirtualCardUrl").(is_object($user) ? ' - '.$user->getFullName($langs) : ''), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', ''), $urltovirtualcard, '', 'button-top-menu-dropdown marginleftonly nohover', "closeTopMenuLoginDropdown()", '', 'v');
- $logoutLink = ''.$langs->trans("Logout").'';
+ $virtuelcardLink = dolButtonToOpenUrlInDialogPopup('publicvirtualcardmenu', $langs->trans("PublicVirtualCardUrl").(is_object($user) ? ' - '.$user->getFullName($langs) : '').' ('.$stringforfirstkey.' v)', img_picto($langs->trans("PublicVirtualCardUrl").' ('.$stringforfirstkey.' v)', 'card', ''), $urltovirtualcard, '', 'button-top-menu-dropdown marginleftonly nohover', "closeTopMenuLoginDropdown()", '', 'v');
+ $logoutLink = ''.$langs->trans("Logout").'';
$profilName = $user->getFullName($langs).' ('.$user->login.')';
if (!empty($user->admin)) {
@@ -2525,9 +2545,20 @@ function top_menu_quickadd()
$html = '';
+ // accesskey is for Windows or Linux: ALT + key for chrome, ALT + SHIFT + KEY for firefox
+ // accesskey is for Mac: CTRL + key for all browsers
+ $stringforfirstkey = $langs->trans("KeyboardShortcut");
+ if ($conf->browser->name == 'chrome') {
+ $stringforfirstkey .= ' ALT +';
+ } elseif ($conf->browser->name == 'firefox') {
+ $stringforfirstkey .= ' ALT + SHIFT +';
+ } else {
+ $stringforfirstkey .= ' CTL +';
+ }
+
$html .= '