diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-26 21:08:18 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-26 21:08:18 +0000 |
commit | 585a1ba974329a2915fefeb67f62740f0cd0613e (patch) | |
tree | f33603bd0a187722d9fb83d3055f7e00bfd60a03 /engine | |
parent | 840b0d624556fcdab1372b99ad59bf18a5bd35eb (diff) | |
download | elgg-585a1ba974329a2915fefeb67f62740f0cd0613e.tar.gz elgg-585a1ba974329a2915fefeb67f62740f0cd0613e.tar.bz2 |
Graceful degrading for non-JS users on the dropdown login box.
git-svn-id: http://code.elgg.org/elgg/trunk@5887 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/users.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index 02b0f9027..9bb2a3f15 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1672,6 +1672,22 @@ function registration_page_handler($page_elements) { } /** + * Display a login box. + * + * This is a fallback for non-JS users who click on the + * dropdown login link. + */ +function elgg_user_login_page_handler() { + $content = elgg_view_layout('one_column', elgg_view('account/forms/login')); + $content = ' + <div id="elgg_content" class="clearfloat"> + ' . elgg_view('account/forms/login') . ' + </div> + '; + page_draw('test', $content); +} + +/** * Sets the last action time of the given user to right now. * * @param int $user_guid The user GUID @@ -1775,10 +1791,10 @@ function users_init() { register_page_handler('friends', 'friends_page_handler'); register_page_handler('friendsof', 'friends_of_page_handler'); - //register_page_handler('collections', 'collections_page_handler'); register_page_handler('dashboard', 'dashboard_page_handler'); register_page_handler('register', 'registration_page_handler'); register_page_handler('resetpassword', 'elgg_user_resetpassword_page_handler'); + register_page_handler('login', 'elgg_user_login_page_handler'); register_action("register", true); register_action("useradd", true); @@ -1873,4 +1889,4 @@ function users_test($hook, $type, $value, $params) { //register actions ************************************************************* register_elgg_event_handler('init','system','users_init',0); register_elgg_event_handler('pagesetup','system','users_pagesetup',0); -register_plugin_hook('unit_test', 'system', 'users_test'); +register_plugin_hook('unit_test', 'system', 'users_test');
\ No newline at end of file |