auth : the alert box is now more user friendly

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3018 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-09-01 10:54:17 +00:00
parent ef9c921aca
commit 276f97836c

View File

@@ -54,7 +54,8 @@ class auth
padding-top: 10px; padding-top: 10px;
margin-bottom: 20px; margin-bottom: 20px;
background-color:white;}\n"; background-color:white;}\n";
$res .= "input[type='submit'] { $res .= "input[type='submit'], a {
text-decoration: none;
display: inline-block; display: inline-block;
padding: 10px 32px; padding: 10px 32px;
color: #fff; color: #fff;
@@ -65,8 +66,14 @@ class auth
font-weight: 400; font-weight: 400;
vertical-align: middle; vertical-align: middle;
border-radius : 4px; border-radius : 4px;
height: 40px; margin-bottom : 20px;
margin-top : 10px; }\n";
$res .= ".alert {
color: #a94442;
background-color: #f2dede;
border: 1px solid #ebccd1;
border-radius: 4px;
padding: 15px;
}\n"; }\n";
$res .= "h1 { color: #bbb }\n"; $res .= "h1 { color: #bbb }\n";
$res .= "h2 { padding-top: 0px; padding-bottom: 30px;}\n"; $res .= "h2 { padding-top: 0px; padding-bottom: 30px;}\n";
@@ -109,13 +116,17 @@ class auth
"Already sign in"); "Already sign in");
$res .= "</h2>\n"; $res .= "</h2>\n";
if (is_string ($alreadyAuth)) if (is_string ($alreadyAuth))
{
$res .= "<h3>".dgettext ("domframework", "With login:")."</h3>\n";
$res .= " <h4>$alreadyAuth</h4>\n"; $res .= " <h4>$alreadyAuth</h4>\n";
}
$res .= " <p><a href='". $baseURL."authentication/logout'>". $res .= " <p><a href='". $baseURL."authentication/logout'>".
dgettext ("domframework", "Click here to logout")."</a></p>\n"; dgettext ("domframework", "Logout")."</a>\n";
if ($url !== "") if ($url !== "")
$res .= "<p><a href='$baseURL$url'>". $res .= "<a href='$baseURL$url'>".
dgettext ("domframework", "Go back to the calling page"). dgettext ("domframework", "Go back to the calling page").
"</a></p>\n"; "</a>\n";
$res .="</p>\n";
} }
if ($message !== "" && $message !== null) if ($message !== "" && $message !== null)
$res .= " <div class='alert alert-danger'>$message</div>\n"; $res .= " <div class='alert alert-danger'>$message</div>\n";