themeyness

git-svn-id: file:///home/shish/svn/shimmie2/trunk@381 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-27 00:49:03 +00:00
parent 7ffbde97dc
commit 7c9740e4d3
2 changed files with 9 additions and 8 deletions

View File

@ -152,20 +152,13 @@ class UserPage extends Extension {
global $config;
if(!$config->get_bool("login_signup_enabled")) {
$page->set_title("Signups Disabled");
$page->set_heading("Signups Disabled");
$page->add_block(new NavBlock());
$page->add_block(new Block("Signups Disabled",
"The board admin has disabled the ability to create new accounts~"));
$this->theme->display_signups_disabled($page);
}
else if(isset($_POST['name']) && isset($_POST['pass1']) && isset($_POST['pass2'])) {
$name = trim($_POST['name']);
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
$page->set_title("Error");
$page->set_heading("Error");
$page->add_block(new NavBlock());
if(strlen($name) < 1) {
$this->theme->display_error($page, "Error", "Username must be at least 1 character");
}

View File

@ -41,6 +41,14 @@ class UserPageTheme extends Themelet {
$page->add_block(new Block("Signup", $html));
}
public function display_signups_disabled($page) {
$page->set_title("Signups Disabled");
$page->set_heading("Signups Disabled");
$page->add_block(new NavBlock());
$page->add_block(new Block("Signups Disabled",
"The board admin has disabled the ability to create new accounts~"));
}
public function display_login_block($page) {
global $config;
$html = "