Add message on disconnect button when using an authentication mode where

disconnect has no sense.
This commit is contained in:
Laurent Destailleur 2014-04-23 12:29:41 +02:00
parent c1e349d110
commit caf6712286
2 changed files with 5 additions and 3 deletions

View File

@ -206,6 +206,7 @@ Limit=Limit
Limits=Limits
DevelopmentTeam=Development Team
Logout=Logout
NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode <b>%s</b>
Connection=Connection
Setup=Setup
Alert=Alert

View File

@ -1430,11 +1430,11 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// Link info
$logouttext='';
$logouthtmltext=$appli.'<br>';
$logouthtmltext.=$langs->trans("Logout").'<br>';
//$logouthtmltext.="<br>";
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
{
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
$logouthtmltext.=$langs->trans("Logout").'<br>';
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php"';
//$logouttext .=empty($atarget?(' target="'.$atarget.'"'):'';
$logouttext .='>';
$logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1);
@ -1442,6 +1442,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
}
else
{
$logouthtmltext.=$langs->trans("NoLogoutProcessWithAuthMode",$_SESSION["dol_authmode"]);
$logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1);
}