better looking downtime message, and login box
This commit is contained in:
parent
ceb4019588
commit
9a79f77deb
3 changed files with 49 additions and 6 deletions
|
@ -13,14 +13,41 @@ class DowntimeTheme extends Themelet {
|
|||
* Display $message and exit
|
||||
*/
|
||||
public function display_message($message) {
|
||||
global $config;
|
||||
$theme_name = $config->get_string('theme');
|
||||
$data_href = get_base_href();
|
||||
$login_link = make_link("user_admin/login");
|
||||
header("HTTP/1.0 503 Service Temporarily Unavailable");
|
||||
|
||||
print <<<EOD
|
||||
<html>
|
||||
<head>
|
||||
<title>Downtime</title>
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
$message
|
||||
<div id="downtime">
|
||||
<h1>Down for Maintenance</h1>
|
||||
<div id="message">
|
||||
$message
|
||||
</div>
|
||||
<h3>Admin Login</h3>
|
||||
<div id="login">
|
||||
<form action="$login_link" method="POST">
|
||||
<table id="login_table" summary="Login Form">
|
||||
<tr>
|
||||
<td width="70"><label for="user">Name</label></td>
|
||||
<td width="70"><input id="user" type="text" name="user"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="pass">Password</label></td>
|
||||
<td><input id="pass" type="password" name="pass"></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"><input type="submit" value="Log In"></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOD;
|
||||
|
|
|
@ -78,11 +78,17 @@ class UserPageTheme extends Themelet {
|
|||
global $config;
|
||||
$html = "
|
||||
<form action='".make_link("user_admin/login")."' method='POST'>
|
||||
<table summary='Login Form' align='center'>
|
||||
<tr><td width='70'>Name</td><td width='70'><input type='text' name='user'></td></tr>
|
||||
<tr><td>Password</td><td><input type='password' name='pass'></td></tr>
|
||||
<tr><td colspan='2'><input type='submit' name='gobu' value='Log In'></td></tr>
|
||||
</table>
|
||||
<table summary='Login Form'>
|
||||
<tr>
|
||||
<td width='70'><label for='user'>Name</label></td>
|
||||
<td width='70'><input id='user' type='text' name='user'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for='pass'>Password</label></td>
|
||||
<td><input id='pass' type='password' name='pass'></td>
|
||||
</tr>
|
||||
<tr><td colspan='2'><input type='submit' value='Log In'></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
";
|
||||
if($config->get_bool("login_signup_enabled")) {
|
||||
|
|
|
@ -225,3 +225,13 @@ UL {
|
|||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
#downtime #message, #downtime #login {
|
||||
text-align: center;
|
||||
}
|
||||
#downtime H3 {
|
||||
margin-top: 32px;
|
||||
}
|
||||
#downtime #login_table {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue