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