From 0181f2cbe5210a0c1ff7798596cf45632996a5c3 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 9 Nov 2010 03:17:43 +0000 Subject: Refs #2506 reorged the login box views - css still needs to be cleaned up git-svn-id: http://code.elgg.org/elgg/trunk@7271 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/account/forms/login.php | 46 +++--- views/default/account/forms/login_dropdown.php | 162 --------------------- .../default/account/forms/login_walled_garden.php | 109 -------------- views/default/account/login_box.php | 25 ++++ views/default/account/login_dropdown.php | 52 +++++++ views/default/account/login_walled_garden.php | 114 +++++++++++++++ views/default/css.php | 93 +++++++++++- views/default/css_ie.php | 11 ++ views/default/page_elements/header.php | 2 +- 9 files changed, 317 insertions(+), 297 deletions(-) delete mode 100644 views/default/account/forms/login_dropdown.php delete mode 100644 views/default/account/forms/login_walled_garden.php create mode 100644 views/default/account/login_box.php create mode 100644 views/default/account/login_dropdown.php create mode 100644 views/default/account/login_walled_garden.php (limited to 'views') diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php index ceaaf66d0..8b4d88583 100644 --- a/views/default/account/forms/login.php +++ b/views/default/account/forms/login.php @@ -5,33 +5,31 @@ * @package Elgg * @subpackage Core */ +?> -$form_body = ""; -$form_body .= "
"; -$form_body .= "
"; +

+ + 'username', 'class' => 'login_textarea')); ?> + + 'password', 'class' => 'login_textarea')); ?> -$form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer', 'value' => 'true')); -$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))); -$form_body .= "

"; + elgg_echo('login'))); ?> -$form_body .= elgg_view('login/extend'); + + + -$form_body .= "

"; -$form_body .= $CONFIG->allow_registration ? "" . elgg_echo('register') . ' | ' : ''; -$form_body .= "" . elgg_echo('user:password:lost') . "

"; + -$login_url = elgg_get_site_url(); -if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { - $login_url = str_replace("http", "https", elgg_get_site_url()); -} +allow_registration) { + echo '' . elgg_echo('register') . ' | '; + } ?> - -
-

- $form_body, 'action' => "{$login_url}action/login")); - ?> -
- \ No newline at end of file + + + +

\ No newline at end of file diff --git a/views/default/account/forms/login_dropdown.php b/views/default/account/forms/login_dropdown.php deleted file mode 100644 index 978507914..000000000 --- a/views/default/account/forms/login_dropdown.php +++ /dev/null @@ -1,162 +0,0 @@ -" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea name')); - $form_body .= "" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea')); - $form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . "

"; - - $form_body .= elgg_view('login/extend'); - - $form_body .= "

"; - $form_body .= $CONFIG->allow_registration ? "" . elgg_echo('register') . ' | ' : ''; - $form_body .= "" . elgg_echo('user:password:lost') . "

"; - $form_body .= ""; - - $login_url = elgg_get_site_url(); - if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { - $login_url = str_replace("http", "https", elgg_get_site_url()); - } -?> - -
- -
- $form_body, 'action' => "{$login_url}action/login")); -?> -
-
- - - - - - \ No newline at end of file diff --git a/views/default/account/forms/login_walled_garden.php b/views/default/account/forms/login_walled_garden.php deleted file mode 100644 index 8f0faefe8..000000000 --- a/views/default/account/forms/login_walled_garden.php +++ /dev/null @@ -1,109 +0,0 @@ -" . elgg_echo('username') . "
" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea username')) . ""; -$form_body .= "
"; -$form_body .= "
"; -$form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer', 'value' => 'true')); -$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))); -$form_body .= "
"; - -$register = elgg_echo('register'); -$lost_password = elgg_echo('user:password:lost'); -$form_body .= '

'; -$form_body .= $CONFIG->allow_registration ? "$register | " : ''; -$form_body .= "$lost_password"; -$form_body .= '

'; - -$login_url = elgg_get_site_url(); -if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { - $login_url = str_replace("http", "https", elgg_get_site_url()); -} -?> -

- $form_body, 'action' => "{$login_url}action/login")); - echo elgg_view('login/extend'); // view for plugins to extend -?> - -allow_registration) { - $title = elgg_echo('register'); - $body = elgg_view("account/forms/register", array( - 'friend_guid' => (int) get_input('friend_guid', 0), - 'invitecode' => get_input('invitecode'), - )); - - echo <<<__HTML - -__HTML; -} -?> - " . elgg_echo('user:password:text') . "

"; - $lostpassword_form_body .= "

"; - $lostpassword_form_body .= elgg_view('input/captcha'); - $lostpassword_form_body .= "

" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "

"; - - ?> - - - diff --git a/views/default/account/login_box.php b/views/default/account/login_box.php new file mode 100644 index 000000000..0f06720f3 --- /dev/null +++ b/views/default/account/login_box.php @@ -0,0 +1,25 @@ +https_login)) && ($CONFIG->https_login)) { + $login_url = str_replace("http", "https", elgg_get_site_url()); +} +?> + +
+

+ $form_body, 'action' => "{$login_url}action/login")); + ?> +
+ diff --git a/views/default/account/login_dropdown.php b/views/default/account/login_dropdown.php new file mode 100644 index 000000000..29eca2347 --- /dev/null +++ b/views/default/account/login_dropdown.php @@ -0,0 +1,52 @@ +"; + +$login_url = elgg_get_site_url(); +if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { + $login_url = str_replace("http", "https", elgg_get_site_url()); +} + +?> + +
+ +
+ $form_body, 'action' => "{$login_url}action/login")); ?> +
+
+ + \ No newline at end of file diff --git a/views/default/account/login_walled_garden.php b/views/default/account/login_walled_garden.php new file mode 100644 index 000000000..f97e8c731 --- /dev/null +++ b/views/default/account/login_walled_garden.php @@ -0,0 +1,114 @@ +" . elgg_echo('username') . "
" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea username')) . ""; +$form_body .= "
"; +$form_body .= "
"; + +$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))); +$form_body .= "
"; + +$register = elgg_echo('register'); +$lost_password = elgg_echo('user:password:lost'); +$form_body .= '

'; +$form_body .= $CONFIG->allow_registration ? "$register | " : ''; +$form_body .= "$lost_password"; +$form_body .= '

'; +*/ + +$form_body = elgg_view('account/forms/login'); +$form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer', 'value' => 'true')); + +$login_url = elgg_get_site_url(); +if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { + $login_url = str_replace("http", "https", elgg_get_site_url()); +} +?> +

+ $form_body, 'action' => "{$login_url}action/login")); + echo elgg_view('login/extend'); // view for plugins to extend +?> + +allow_registration) { + $title = elgg_echo('register'); + $body = elgg_view("account/forms/register", array( + 'friend_guid' => (int) get_input('friend_guid', 0), + 'invitecode' => get_input('invitecode'), + )); + + echo <<<__HTML + +__HTML; +} +?> + " . elgg_echo('user:password:text') . "

"; + $lostpassword_form_body .= "

"; + $lostpassword_form_body .= elgg_view('input/captcha'); + $lostpassword_form_body .= "

" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "

"; + + ?> + + + diff --git a/views/default/css.php b/views/default/css.php index 618195c56..e60ec8e41 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -867,6 +867,13 @@ li.navigation_more ul li { .register input[type="password"] { width:380px; } +.rememberme label { + font-weight:normal; + font-size:100%; +} +.loginbox .submit_button { + margin-right: 15px; +} #login .persistent_login { float:right; display:block; @@ -878,7 +885,91 @@ li.navigation_more ul li { font-weight: normal; cursor: pointer; } - +#login_dropdown { + float:right; + position: absolute; + top:10px; + right:0; + z-index: 9599; +} +#login_dropdown #signin_button { + padding:10px 0px 12px; + line-height:23px; + text-align:right; +} +#login_dropdown #signin_button a.signin { + padding:2px 6px 3px 6px; + text-decoration:none; + font-weight:bold; + position:relative; + margin-left:0; + color:white; + border:1px solid #71B9F7; + -webkit-border-radius:4px; + -moz-border-radius:4px; + border-radius:4px; +} +#login_dropdown #signin_button a.signin span { + padding:4px 0 6px 12px; + background-image:url(_graphics/elgg_sprites.png); + background-position:-150px -51px; + background-repeat:no-repeat; +} +#login_dropdown #signin_button a.signin:hover { + background-color:#71B9F7; + /* color:black; */ +} +#login_dropdown #signin_button a.signin:hover span { + /* background-position:-150px -71px; */ +} +#login_dropdown #signin_button a.signin.menu_open { + background:#cccccc !important; + color:#666666 !important; + border:1px solid #cccccc; + outline:none; +} +#login_dropdown #signin_button a.signin.menu_open span { + background-position:-150px -71px; + color:#333333; +} +#login_dropdown #signin_menu { + -moz-border-radius-topleft:5px; + -moz-border-radius-bottomleft:5px; + -moz-border-radius-bottomright:5px; + -webkit-border-top-left-radius:5px; + -webkit-border-bottom-left-radius:5px; + -webkit-border-bottom-right-radius:5px; + display:none; + background-color:white; + position:absolute; + width:210px; + z-index:100; + border:5px solid #CCCCCC; + text-align:left; + padding:12px; + top: 26px; + right: 0px; + margin-top:5px; + margin-right: 0px; + color:#333333; + -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45); +} +#login_dropdown #signin_menu input[type=text], +#login_dropdown #signin_menu input[type=password] { + width:203px; + margin:0 0 5px; +} +#login_dropdown #signin_menu p { + margin:0; +} +#login_dropdown #signin_menu label { + font-weight:normal; + font-size: 100%; +} +#login_dropdown #signin_menu .submit_button { + margin-right:15px; +} /* *************************************** CONTENT HEADER diff --git a/views/default/css_ie.php b/views/default/css_ie.php index e07fddf47..d22417ada 100644 --- a/views/default/css_ie.php +++ b/views/default/css_ie.php @@ -65,3 +65,14 @@ /* shared access */ .shared_access_collection h2.shared_access_name {margin-top:-15px;} + +/* dropdown login */ +*:first-child+html #login_dropdown #signin_button { + line-height:10px; +} +*:first-child+html #login_dropdown #signin_button a.signin span { + background-position:-150px -54px; +} +*:first-child+html #login_dropdown #signin_button a.signin.menu_open span { + background-position:-150px -74px; +} \ No newline at end of file diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php index 43ddf7251..f747b67a2 100644 --- a/views/default/page_elements/header.php +++ b/views/default/page_elements/header.php @@ -12,7 +12,7 @@ echo elgg_view('page_elements/header_logo', $vars); // drop-down login - echo elgg_view('account/forms/login_dropdown'); + echo elgg_view('account/login_dropdown'); // insert site-wide navigation echo elgg_view('navigation/site_nav'); -- cgit v1.2.3