Debug v18

This commit is contained in:
Laurent Destailleur 2023-05-14 18:11:27 +02:00
parent a716e6d95b
commit bbc630a77d
3 changed files with 30 additions and 11 deletions

View File

@ -72,6 +72,8 @@ if (preg_match('/'.preg_quote('core/modules/oauth', '/').'/', $php_self)) {
$php_self = DOL_URL_ROOT.'/index.php?mainmenu=home';
}
$php_self = preg_replace('/(\?|&|&)action=[^&]+/', '\1', $php_self);
$php_self = preg_replace('/(\?|&|&)username=[^&]*/', '\1', $php_self);
$php_self = preg_replace('/(\?|&|&)entity=\d+/', '\1', $php_self);
$php_self = preg_replace('/(\?|&|&)massaction=[^&]+/', '\1', $php_self);
$php_self = preg_replace('/(\?|&|&)token=[^&]+/', '\1', $php_self);
@ -335,8 +337,8 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->fil
$langs->load("users");
//if (!empty($conf->global->MAIN_OPENIDURL_PERUSER)) $url=
echo '<br>';
echo '<div class="center" style="margin-top: 4px;">';
print '<div class="center" style="margin-top: 20px; margin-bottom: 10px">';
print '<div class="loginbuttonexternal">';
$url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
if (!empty($url)) {
@ -346,14 +348,14 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->fil
print '<span class="warning">'.$langs->trans("ErrorOpenIDSetupNotComplete", 'MAIN_AUTHENTICATION_OPENID_URL').'</span>';
}
echo '</div>';
print '</div>';
print '</div>';
}
if (isset($conf->file->main_authentication) && preg_match('/google/', $conf->file->main_authentication)) {
$langs->load("users");
echo '<br>';
echo '<div class="center" style="margin-top: 4px; margin-bottom: 10px">';
echo '<div class="center" style="margin-top: 20px; margin-bottom: 10px">';
/*global $dolibarr_main_url_root;
@ -372,11 +374,14 @@ if (isset($conf->file->main_authentication) && preg_match('/google/', $conf->fil
//$url = $urltorenew;
*/
echo '<input type="hidden" name="beforeoauthloginredirect" id="beforeoauthloginredirect" value="">';
print '<input type="hidden" name="beforeoauthloginredirect" id="beforeoauthloginredirect" value="">';
print '<a class="alogin" href="#" onclick="jQuery(\'#beforeoauthloginredirect\').val(1); $(this).closest(\'form\').submit();">';
print '<div class="loginbuttonexternal">';
print img_picto('', 'google', 'class="pictofixedwidth"');
print '<a class="alogin" href="#" onclick="jQuery(\'#beforeoauthloginredirect\').val(1); $(this).closest(\'form\').submit();">'.$langs->trans("LoginWith", "Google").'</a>';
echo '</div>';
print $langs->trans("LoginWith", "Google");
print '</div>';
print '</a>';
print '</div>';
}
?>

View File

@ -2921,7 +2921,6 @@ if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
print ' background-color: #FFFFFF;';
}
?>
-webkit-box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(60,60,60,0.15);
box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(60,60,60,0.15);
@ -3111,6 +3110,15 @@ img.login, img.printer, img.entity {
color: white;
font-weight: bold;
}
.loginbuttonexternal {
width: 300px;
margin: auto;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
}
.userimg.atoplogin img.userphoto, .userimgatoplogin img.userphoto { /* size for user photo in login bar */
width: <?php echo $disableimages ? '26' : '30'; ?>px;
height: <?php echo $disableimages ? '26' : '30'; ?>px;

View File

@ -2361,7 +2361,6 @@ div.backgroundsemitransparent {
}
#id-right {
padding-<?php print $left; ?>: 0 ! important;
}
@ -3122,6 +3121,13 @@ table.login_table_securitycode tr td {
max-width: 170px;
max-height: 90px;
}
.loginbuttonexternal {
width: 300px;
margin: auto;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
}
.atoplogin.dropdown .dropdown-menu {