auth : Add the application name in authentication panel

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2234 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-08-13 14:34:45 +00:00
parent ac0cf5a16b
commit e536e15009
2 changed files with 12 additions and 1 deletions

View File

@@ -6,6 +6,9 @@
/** User authentication (abstract class) */
class auth
{
/** The application name */
public $appName = null;
/** Display the authentication page
The message is displayed to the user in case of error
The url is the caller url to go back if authentication is correct
@@ -28,7 +31,7 @@ class auth
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 { max-width: 430px;padding:15px;margin:0 auto;}\n";
$res .= ".form-signin .form-signin-heading, .form-signin .checkbox {";
$res .= " margin-bottom: 10px; }\n";
$res .= ".form-signin .checkbox { font-weight: normal; }\n";
@@ -65,11 +68,14 @@ class auth
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 .= "h1 { color: #bbb }\n";
$res .= "h2 { padding-top: 0px; padding-bottom: 30px;}\n";
$res .= " </style>\n";
$res .= " </head>\n";
$res .= " <body>\n";
$res .= "<div class='container'>\n";
if ($this->appName !== null)
$res .= "<h1>".$this->appName."</h1>\n";
$res .= " <form class='form-signin' role='form' method='post' ";
$res .= "action='";
if ($url === "")