diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-06 21:15:02 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-06 21:15:02 +0000 |
commit | 4a9c6c26190fd91c3e5ade9af1d15b4e68ace293 (patch) | |
tree | 561ee761cdbcb933fcd1042c84e38c82d9be9ba7 /views/default | |
parent | d7878dd44304a55fe3b35a786b47abafc56d2ffe (diff) | |
download | elgg-4a9c6c26190fd91c3e5ade9af1d15b4e68ace293.tar.gz elgg-4a9c6c26190fd91c3e5ade9af1d15b4e68ace293.tar.bz2 |
Refs #2693 walled garden code is functional. Push back a thorough clean up until Elgg 1.9
git-svn-id: http://code.elgg.org/elgg/trunk@8614 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/core/account/login_walled_garden.php | 110 | ||||
-rw-r--r-- | views/default/css/walled_garden.php | 69 | ||||
-rw-r--r-- | views/default/page/elements/footer.php | 7 | ||||
-rw-r--r-- | views/default/page/walled_garden.php | 27 |
4 files changed, 128 insertions, 85 deletions
diff --git a/views/default/core/account/login_walled_garden.php b/views/default/core/account/login_walled_garden.php index 93aa87782..dbb9f866f 100644 --- a/views/default/core/account/login_walled_garden.php +++ b/views/default/core/account/login_walled_garden.php @@ -1,96 +1,98 @@ <?php /** -* Walled Garden Login Form -*/ + * Walled Garden Login Form + * + * @todo still requires clean up + */ + +$reg_url = elgg_normalize_url('pg/register/'); +$forgot_url = elgg_normalize_url('pages/account/forgotten_password.php'); +$cancel_button = elgg_view('input/button', array( + 'value' => elgg_echo('cancel'), + 'class' => 'elgg-button-cancel mlm', +)); $form_body = elgg_view('forms/login'); -$form_body .= elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true')); +$form_body .= elgg_view('input/hidden', array( + 'name' => 'returntoreferer', + 'value' => 'true', +)); $login_url = elgg_get_site_url(); if (elgg_get_config('https_login')) { $login_url = str_replace("http", "https", elgg_get_site_url()); } + ?> <h2><?php echo elgg_echo('login'); ?></h2> <?php - //@todo Forms 1.8: Convert to use elgg_view_form() - echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login")); - echo elgg_view('login/extend'); // view for plugins to extend -?> +//@todo Forms 1.8: Convert to use elgg_view_form() +echo elgg_view('input/form', array( + 'body' => $form_body, + 'action' => "{$login_url}action/login", +)); -<?php if (elgg_get_config('allow_registration')) { $title = elgg_echo('register'); - $body = elgg_view("account/forms/register", array( + $body = elgg_view_form('register', array(), array( 'friend_guid' => (int) get_input('friend_guid', 0), 'invitecode' => get_input('invitecode'), )); echo <<<__HTML -<div id="registration_form" class="hidden clearfix"> -<div id="hiddenform_body" class="clearfix"> - <h2>$title</h2> - $body -</div><div id="hiddenform_bottom"></div></div> +<div id="elgg-walledgarden-registration" class="hidden clearfix"> + <div class="elgg-hiddenform-body" class="clearfix"> + <h2>$title</h2> + $body + </div> + <div class="elgg-hiddenform-bottom"></div> +</div> __HTML; } + +$title = elgg_echo('user:password:lost'); +$body = elgg_view_form('user/requestnewpassword'); +echo <<<__HTML +<div id="elgg-walledgarden-lostpassword" class="hidden clearfix"> + <div class="elgg-hiddenform-body" class="clearfix"> + <h2>$title</h2> + $body + </div> + <div class="elgg-hiddenform-bottom"></div> +</div> +__HTML; + +//@todo JS 1.8: no ?> - <?php - $lostpassword_form_body = "<div>" . elgg_echo('user:password:text') . "</div>"; - $lostpassword_form_body .= "<div class='margin-none'><label>". elgg_echo('username') . " " - . elgg_view('input/text', array('name' => 'username', 'class' => 'login-textarea lostusername')) . "</label></div>"; - $lostpassword_form_body .= elgg_view('input/captcha'); - $lostpassword_form_body .= "<div>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "<input class='elgg-button-action elgg-state-disabled cancel_request' type='reset' value='Cancel'></div>"; - - ?> -<div id="lostpassword_form" class="hidden clearfix"> - <div id="hiddenform_body" class="clearfix"> - <h2><?php echo elgg_echo('user:password:lost'); ?></h2> - <?php - //@todo Forms 1.8: Use elgg_view_form() - echo elgg_view('input/form', array( - 'action' => "action/user/requestnewpassword", - 'body' => $lostpassword_form_body - )); - ?> -</div><div id="hiddenform_bottom"></div></div> -<?php //@todo JS 1.8: no ?> <script type="text/javascript"> $(document).ready(function() { $('input.username').focus(); - // add cancel button to inline register form - $('#registration_form').find('input.elgg-button-submit').after("<input class='elgg-button-action elgg-state-disabled cancel_request' type='reset' value='Cancel'>"); + // add cancel button to inline forms + $('#elgg-walledgarden-registration').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); + $('#elgg-walledgarden-lostpassword').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); function elgg_slide_hiddenform(activateLink, parentElement, toggleElement) { - $(activateLink).closest(parentElement).find(toggleElement).animate({"width": "563px", duration: 400}); - $(activateLink).closest(parentElement).animate({"height": "256px", duration: 400}, function() { - // ewwww dirty. Webkit has problems when showing images that were hidden. - // forcing a reload of all the images. - $('.visual_captcha img').each(function() { $(this).attr('src', $(this).attr('src')); }); - }); - return false; + $(activateLink).closest(parentElement).find(toggleElement).fadeToggle('medium'); } - $('a.registration_link').click(function(e) { + $('a[href="<?php echo $reg_url; ?>"]').click(function(e) { e.preventDefault(); - elgg_slide_hiddenform(this, '.walledgardenlogin', '#registration_form'); + elgg_slide_hiddenform(this, '#elgg-walledgarden-login', '#elgg-walledgarden-registration'); $('input.name').focus(); }); - $('a.forgotten_password_link').click(function(e) { + $('a[href="<?php echo $forgot_url; ?>"]').click(function(e) { e.preventDefault(); - elgg_slide_hiddenform(this, '.walledgardenlogin', '#lostpassword_form'); + elgg_slide_hiddenform(this, '#elgg-walledgarden-login', '#elgg-walledgarden-lostpassword'); $('input.lostusername').focus(); }); - $('input.cancel_request').click(function() { - if ($('#lostpassword_form').is(':visible')) { - $('#lostpassword_form').fadeOut(400); - location.reload(); - } else if ($('#registration_form').is(':visible')) { - $('#registration_form').fadeOut(400); - location.reload(); + $('input.elgg-button-cancel').click(function() { + if ($('#elgg-walledgarden-lostpassword').is(':visible')) { + $('a[href="<?php echo $forgot_url; ?>"]').click(); + } else if ($('#elgg-walledgarden-registration').is(':visible')) { + $('a[href="<?php echo $reg_url; ?>"]').click(); } return false; }); diff --git a/views/default/css/walled_garden.php b/views/default/css/walled_garden.php index 7ba6141d4..75bf0f29e 100644 --- a/views/default/css/walled_garden.php +++ b/views/default/css/walled_garden.php @@ -2,29 +2,64 @@ /** * Walled garden CSS */ + +$url = elgg_get_site_url(); + ?> -.elgg-grid-walledgarden { - margin:100px auto 0 auto; - padding:0; - width:600px; - text-align: left; - word-wrap:break-word; - background: gray; +#elgg-walledgarden { + margin: 100px auto 0 auto; + width: 563px; + min-height: 230px; + background: url(<?php echo $url; ?>_graphics/walled_garden_background_top.gif) no-repeat left top; + padding: 0; + position: relative; +} + +#elgg-walledgarden-bottom { + margin:0 auto; + background: url(<?php echo $url; ?>_graphics/walled_garden_background_bottom.gif) no-repeat left bottom; + width:563px; + height:54px; +} + +#elgg-walledgarden-intro { + width: 230px; + float: left; + margin: 35px 15px 15px 35px; } -.elgg-grid-walledgarden > .elgg-col { - background: white; +#elgg-walledgarden-login { + width: 230px; + float: left; + margin: 30px 15px 45px 19px; } .elgg-heading-walledgarden { - color:#666666; - margin-top:80px; + color: #666666; + margin-top: 60px; line-height: 1.1em; } -.walledgardenlogin h2 { - color:#666666; - border-bottom:1px solid #CCCCCC; - margin-bottom:5px; - padding-bottom:5px; -}
\ No newline at end of file +#elgg-walledgarden-lostpassword, +#elgg-walledgarden-registration { + position: absolute; + right: 0; + top: 0; + width: 563px; + background-color: white; + padding: 0; + background: url(<?php echo $url; ?>_graphics/walled_garden_backgroundfull_top.gif) no-repeat left top; + height: auto; +} + +.elgg-hiddenform-body { + padding: 30px 40px 0 40px; + height: auto; +} +.elgg-hiddenform-bottom { + margin: 0 auto; + background: url(<?php echo $url; ?>_graphics/walled_garden_backgroundfull_bottom.gif) no-repeat left bottom; + width: 563px; + height: 54px; + position: relative; +} diff --git a/views/default/page/elements/footer.php b/views/default/page/elements/footer.php index 06fdb84a5..96afa5d38 100644 --- a/views/default/page/elements/footer.php +++ b/views/default/page/elements/footer.php @@ -19,3 +19,10 @@ echo elgg_view('output/url', array( 'class' => '', )); echo '</div>'; + +?> +<script> +<?php +echo elgg_view('js/lightbox'); +?> +</script> diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 0dcc8a9d7..662e90f45 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -22,22 +22,21 @@ $title = $site->name; <?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?> </div> <div class="elgg-page-body"> - <div class="elgg-inner"> - <div class="elgg-grid elgg-grid-walledgarden"> - <div class="elgg-col elgg-col-1of2"> - <h1 class="elgg-heading-walledgarden"> - <?php - echo elgg_echo('walled_garden:welcome'); - echo ': <br/>'; - echo $title; - ?> - </h1> - </div> - <div class="elgg-col elgg-col-1of2"> - <?php echo $vars['body']; ?> - </div> + <div id="elgg-walledgarden"> + <div id="elgg-walledgarden-intro"> + <h1 class="elgg-heading-walledgarden"> + <?php + echo elgg_echo('walled_garden:welcome'); + echo ': <br/>'; + echo $title; + ?> + </h1> + </div> + <div id="elgg-walledgarden-login"> + <?php echo $vars['body']; ?> </div> </div> + <div id="elgg-walledgarden-bottom"></div> </div> </div> <?php echo elgg_view('footer/analytics'); ?> |