mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-05 14:40:44 -04:00
Clean up the login, maintenance login and required-top-level-login code.
We now have two clear and separate login approaches: login/ajax login/html Choose the one that's appropriate. Totally simplified the maintenance page to be separate from the theme and dead simple, and use login/html approach there. Totally simplified the top level login (login_page.html.php) to just be a login page, not the rest of the chrome on the page and use the login/ajax approach there. Don't use access::required in albums and then catch the exception, instead use access::can and check the return code. Improve the text for maintenance mode.
This commit is contained in:
@@ -99,6 +99,16 @@ class user_Core {
|
||||
return $form;
|
||||
}
|
||||
|
||||
static function get_login_form($url) {
|
||||
$form = new Forge($url, "", "post", array("id" => "gLoginForm"));
|
||||
$group = $form->group("login")->label(t("Login"));
|
||||
$group->input("name")->label(t("Name"))->id("gName")->class(null);
|
||||
$group->password("password")->label(t("Password"))->id("gPassword")->class(null);
|
||||
$group->inputs["name"]->error_messages("invalid_login", t("Invalid name or password"));
|
||||
$group->submit("")->value(t("Login"));
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure that we have a session and group_ids cached in the session.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user