diff options
-rw-r--r-- | mod/walledgarden/graphics/background_bottom.gif | bin | 0 -> 2940 bytes | |||
-rw-r--r-- | mod/walledgarden/graphics/background_extend.gif | bin | 0 -> 199 bytes | |||
-rw-r--r-- | mod/walledgarden/graphics/background_top.gif | bin | 0 -> 10169 bytes | |||
-rw-r--r-- | mod/walledgarden/views/default/account/forms/login.php | 144 | ||||
-rw-r--r-- | mod/walledgarden/views/default/page_shells/walled_garden_index.php | 52 | ||||
-rw-r--r-- | mod/walledgarden/views/default/walledgarden/css.php | 89 |
6 files changed, 133 insertions, 152 deletions
diff --git a/mod/walledgarden/graphics/background_bottom.gif b/mod/walledgarden/graphics/background_bottom.gif Binary files differnew file mode 100644 index 000000000..7e25fbedc --- /dev/null +++ b/mod/walledgarden/graphics/background_bottom.gif diff --git a/mod/walledgarden/graphics/background_extend.gif b/mod/walledgarden/graphics/background_extend.gif Binary files differnew file mode 100644 index 000000000..09f7318e3 --- /dev/null +++ b/mod/walledgarden/graphics/background_extend.gif diff --git a/mod/walledgarden/graphics/background_top.gif b/mod/walledgarden/graphics/background_top.gif Binary files differnew file mode 100644 index 000000000..145bac9e9 --- /dev/null +++ b/mod/walledgarden/graphics/background_top.gif diff --git a/mod/walledgarden/views/default/account/forms/login.php b/mod/walledgarden/views/default/account/forms/login.php index 7cb38faed..1c3bbe512 100644 --- a/mod/walledgarden/views/default/account/forms/login.php +++ b/mod/walledgarden/views/default/account/forms/login.php @@ -1,111 +1,57 @@ <?php
-
- /**
- * Elgg login form for walled garden
- */
+/**
+* Walled Garden Login Form
+*/
- global $CONFIG;
-
- //login form
- $form_body = "<h2 class='master'>" . elgg_echo('login') . "</h2>";
- $form_body .= "<label>".elgg_echo('username')."</label>".elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea username master'));
- $form_body .= "<br /><label>".elgg_echo('password')."</label>".elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea password master' ));
+global $CONFIG;
-
- $form_body .= "<br />" . elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div>";
- $form_body .= "<p class=\"loginbox\">";
- $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
- $form_body .= "<a href='#forgotten_password' class='forgotten_password_link'>" . elgg_echo('user:password:lost') . "</a></p>";
+$form_body = "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea username')) . "</label>";
+$form_body .= "<br />";
+$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea')) . "</label><br />";
+$form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer', 'value' => 'true'));
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login')));
+$form_body .= "<div class='remember_me'><label><input type='checkbox' name='persistent' checked value='true' />".elgg_echo('user:persistent')."</label></div>";
+$form_body .= "<p class='lost_password'><a class='forgotten_password_link' href=\"{$login_url}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
+$login_url = $vars['url'];
+if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+ $login_url = str_replace("http", "https", $vars['url']);
+}
+?>
-
- $login_url = $vars['url'];
- if ((isset($CONFIG->https_login)) && ($CONFIG->https_login))
- $login_url = str_replace("http", "https", $vars['url']);
+<h2><?php echo elgg_echo('login'); ?></h2>
+<?php
+ echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
+ echo elgg_view('login/extend'); // view for plugins to extend
?>
-
- <div id="login-box">
- <?php
- echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
- echo elgg_view('login/extend'); //a view for plugins to extend
- ?>
- <div class="clearfloat"></div>
- </div>
-
+<div class="lostpassword_form margin_top hidden">
+ <?php
+ $lostpassword_form_body = "<p>" . elgg_echo('user:password:text') . "</p>";
+ $lostpassword_form_body .= "<p><label>". elgg_echo('username') . " "
+ . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea lostusername')) . "</label></p>";
+ $lostpassword_form_body .= elgg_view('input/captcha');
+ $lostpassword_form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>";
+
+ ?>
+ <h2><?php echo elgg_echo('user:password:lost'); ?></h2>
+ <?php
+ echo elgg_view('input/form', array(
+ 'action' => "{$vars['url']}action/user/requestnewpassword",
+ 'body' => $lostpassword_form_body,
+ 'class' => "margin_top"
+ ));
+ ?>
+</div>
+
<script type="text/javascript">
- $(document).ready(function() {
-
- $('.login-textarea.username.master').focus(); // only put cursor in textfirld if master login
+$(document).ready(function() {
+ $('input.username').focus();
- $('.login-textarea.name').focus(function() {
- if (this.value=='<?php echo elgg_echo('username'); ?>') {
- this.value='';
- }
- });
- $('.login-textarea.name').blur(function() {
- if (this.value=='') {
- this.value='<?php echo elgg_echo('username'); ?>';
- }
- });
- $('.login-textarea.password').focus(function() {
- if (this.value=='<?php echo elgg_echo('password'); ?>') {
- this.value='';
- }
- });
-
-
- //select all the a tag with name equal to modal
$('a.forgotten_password_link').click(function(e) {
- //Cancel the link behavior
e.preventDefault();
-
- //Get the A tag
- var id = $(this).attr('href');
-
- //Get the screen height and width
- //var maskHeight = $(document).height();
- //var maskWidth = $(window).width();
-
- //Set height and width to mask to fill up the whole screen
- //$('#mask').css({'width':maskWidth,'height':maskHeight});
-
- //transition effect
- $('#mask').fadeIn(500);
- $('#mask').fadeTo("slow",0.8);
-
- //Get the window height and width
- var winH = $(window).height();
- var winW = $(window).width();
-
- //Set the popup window to center
- $(id).css('top', winH/4-$(id).height()/2);
- $(id).css('left', (winW-20)/2-$(id).width()/2);
-
- //transition effect
- $(id).fadeIn(1000);
-
- });
-
- //if close button is clicked
- $('.window .close').click(function (e) {
- //Cancel the link behaviour
- e.preventDefault();
-
- $('#mask').hide();
- $('.window').hide();
- });
-
- //if mask is clicked
- $('#mask').click(function () {
- $(this).hide();
- $('.window').hide();
- });
-
+ elgg_slide_toggle(this, '.walledgardenlogin', '.lostpassword_form');
+ $('input.lostusername').focus();
+ });
});
-</script>
-
-
-
-
-
\ No newline at end of file +</script>
\ No newline at end of file diff --git a/mod/walledgarden/views/default/page_shells/walled_garden_index.php b/mod/walledgarden/views/default/page_shells/walled_garden_index.php index 33e3605a1..12b58c7da 100644 --- a/mod/walledgarden/views/default/page_shells/walled_garden_index.php +++ b/mod/walledgarden/views/default/page_shells/walled_garden_index.php @@ -27,50 +27,14 @@ if (empty($vars['title'])) { }
echo elgg_view('page_elements/html_begin', $vars);
-echo elgg_view('messages/list', array('object' => $vars['sysmessages']));
-?>
- <style type="text/css">
- /*
-body {background: white;}
- #walledgardenlogin {
- position:absolute;
- bottom:0;
- left:280px;
- height:250px;
- width:272px;
- }
- #walledgardenintro {
- position: absolute;
- bottom:15px;
- left:25px;
- height:215px;
- width:232px;
- padding:10px;
- background-color: white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
- }
- #walledgardenlogin #login-box {
- background: none;
- }
- #walledgardenlogin #login-box h2 {
- display:none;
- }
- #walledgardenlogin #login-box form {height:224px;padding:10px 10px 0;}
+echo "<div id='walledgarden_sysmessages'>".elgg_view('messages/list', array('object' => $vars['sysmessages']))."</div>";
- .messages, .messages_error {
- position: relative;
- margin: auto;
- }
-*/
-
- </style>
-<?php
- echo "<div style='margin:20px auto;position:relative;padding:20px;width:523px;height:355px;background: url({$vars['url']}_graphics/login_back.gif) no-repeat top left;'>";
- echo "<div id='walledgardenintro'><h1>Welcome to:<br />" . $title . "</h1></div>";
- echo "<div id='walledgardenlogin' class='whereamIused'>";
- echo $vars['body'];
- echo "</div></div>";
- echo elgg_view('page_elements/html_end', $vars);
+echo "<div id='walledgarden_container'><div id='walledgarden' class='clearfloat'>";
+ echo "<div class='walledgardenintro clearfloat'><h1>Welcome to:<br />" . $title . "</h1></div>";
+ echo "<div class='walledgardenlogin clearfloat'>".$vars['body']."</div>";
+echo "</div>";
+echo "<div id='walledgarden_bottom'></div>";
+echo "</div>";
+echo elgg_view('page_elements/html_end', $vars);
?>
diff --git a/mod/walledgarden/views/default/walledgarden/css.php b/mod/walledgarden/views/default/walledgarden/css.php index 509e5f9de..c7987af2f 100644 --- a/mod/walledgarden/views/default/walledgarden/css.php +++ b/mod/walledgarden/views/default/walledgarden/css.php @@ -1,11 +1,82 @@ <?php /** - * Elgg WalledGarden CSS - * - * @package WalledGarden - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.org/ - */ -?>
\ No newline at end of file +* Elgg WalledGarden CSS +*/ +?> +#walledgarden_container { + margin:100px auto 0 auto; + position:relative; + padding:0; + width:563px; + background: url(<?php echo $vars['url']; ?>mod/walledgarden/graphics/background_extend.gif) repeat-y left top; +} +#walledgarden { + position: relative; + padding:0; + width:563px; + min-height:230px; + background: url(<?php echo $vars['url']; ?>mod/walledgarden/graphics/background_top.gif) no-repeat left top; +} +#walledgarden_bottom { + margin:0 auto; + background: url(<?php echo $vars['url']; ?>mod/walledgarden/graphics/background_bottom.gif) no-repeat left bottom; + width:563px; + height:54px; + position: relative; +} +.walledgardenintro { + float:left; + min-height:200px; + width:223px; + padding:15px; + margin:19px 0 0 23px; +} +.walledgardenlogin { + float:left; + min-height:200px; + width:223px; + padding:15px 15px 0 15px; + margin:19px 0 0 11px; +} +.walledgardenintro h1 { + color:#666666; + margin-top:80px; + line-height: 1.1em; +} +.walledgardenlogin h2 { + color:#666666; + border-bottom:1px solid #CCCCCC; + margin-bottom:5px; + padding-bottom:5px; +} +.walledgardenlogin form input.login_textarea { + margin:0 0 10px 0; + width:210px; +} +.walledgardenlogin form label { + color:#666666; +} +.walledgardenlogin .remember_me label { + font-size:1em; + font-weight:normal; +} +.walledgardenlogin .remember_me { + display:block; + float:right; + margin-left:0; + margin-top:-34px; + text-align:right; + width:100%; +} +.walledgardenlogin .lost_password { + margin-bottom: 10px; +} +.walledgardenlogin a.forgotten_password_link { + color:#999999; +} +#walledgarden_sysmessages #elgg_system_message { + width: 523px; + right:0; + margin:10px auto 0 auto; + position: relative; +}
\ No newline at end of file |