auth : don't need bootstrap nor jquery to work

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2069 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-04-19 11:01:46 +00:00
parent a7b76d153e
commit 77c6eaaf25

View File

@@ -14,27 +14,20 @@ class auth
public function pageHTML ($baseURL, $message="", $url="")
{
$res = "";
$res .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"";
$res .= " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
$res .= "<html>\n";
$res .= "<!DOCTYPE html>\n";
$res .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" ";
$res .= " lang=\"en\">\n";
$res .= "<head>\n";
$res .= "<title>".dgettext("domframework", "Sign in")."</title>\n";
$res .= "<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'";
$res .= " />\n";
$res .= "<script type='text/javascript' src='$baseURL".
"/public/js/jquery.min.js'>";
$res .= "</script>\n";
$res .= "<script type='text/javascript' src='$baseURL".
"/public/js/bootstrap.js'>";
$res .= "</script>\n";
$res .= "<link type='text/css' rel='stylesheet' href='";
$res .= "$baseURL/public/css/bootstrap.css'/>\n";
$res .= " <style type='text/css'>\n";
$res .= "body { padding-top: 40px; padding-bottom: 40px;";
$res .= "background-attachment: fixed; background-position: top;";
$res .= "background-image: radial-gradient(ellipse at center -60px, ";
$res .= "#9da1ac 0%,#1c202a 100%);";
$res .= " background-color: #eee; }\n";
$res .= "body { padding-top: 40px; padding-bottom: 40px;
font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
background-attachment: fixed; background-position: top;
background-image: radial-gradient(ellipse at center -60px,
#9da1ac 0%,#1c202a 100%);
background-color: #eee; }\n";
$res .= ".form-signin { max-width: 330px;padding:15px;margin:0 auto;}\n";
$res .= ".form-signin .form-signin-heading, .form-signin .checkbox {";
$res .= " margin-bottom: 10px; }\n";
@@ -44,11 +37,34 @@ class auth
$res .= "padding: 10px; -webkit-box-sizing: border-box;";
$res .= "-moz-box-sizing: border-box; box-sizing: border-box; }\n";
$res .= ".form-signin .form-control:focus { z-index: 2; }\n";
$res .= ".form-signin input[type='text'] { margin-bottom: -1px;";
$res .= "border-bottom-left-radius: 0; border-bottom-right-radius: 0; }\n";
$res .= ".form-signin input[type='password'] {";
$res .= "margin-bottom: 10px; border-top-left-radius: 0;";
$res .= "border-top-right-radius: 0; }\n";
$res .= ".container { background: white; border-radius:10px;
border-top: none; width:300px;
margin-left: auto; margin-right: auto;
text-align:center;
padding: 20px;}\n";
$res .= "input[type='text'], input[type='password'] {
display:inline-block;
border-radius : 10px 10px 10px 10px;
border: 1px solid #cccccc;
margin: 0px;
height:10px;
padding-top: 10px;
margin-bottom: 20px;
background-color:white;}\n";
$res .= "input[type='submit'] {
vertical-align: middle;
border-radius : 10px 10px 10px 10px;
height: 40px;
margin-top : 10px;
padding-top : 10px;
padding-bottom : 10px;
padding-left : 30px;
padding-right : 30px;
display: inline-block;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.75);
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px rgba(0, 0, 0, 0.05);
background-color: #cccccc;}\n";
$res .= "h2 { padding-top: 0px; padding-bottom: 30px;}\n";
$res .= " </style>\n";
$res .= " </head>\n";
$res .= " <body>\n";
@@ -69,13 +85,12 @@ class auth
$res .= " <input type='password' class='form-control' name='password' ";
$res .= "placeholder='".dgettext("domframework",
"Password")."' required/>\n";
$res .= " <label class='checkbox'>";
$res .= "<input type='checkbox' name='remember-me'/>".dgettext("domframework",
"Remember me");
$res .= "</label>\n";
$res .= " <button class='btn btn-lg btn-primary btn-block' ";
$res .= "type='submit'>".dgettext("domframework",
"Sign in")."</button>\n";
// $res .= " <label class='checkbox'>";
// $res .= "<input type='checkbox' name='remember-me'/>".dgettext("domframework",
// "Remember me");
// $res .= "</label>\n";
$res .= " <input type='submit' value='".dgettext("domframework",
"Sign in")."'/>\n";
if ($message !== "")
$res .= "<div class='alert alert-danger'>$message</div>";
$res .= " </form>\n";