aboutsummaryrefslogtreecommitdiff
path: root/views/default/account
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-02 15:14:59 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-02 15:14:59 +0000
commitb7f65ac7ac3f39728ea5c4e5ba4ebbe285989723 (patch)
treedd88c22224922c415c3a119aaf4a815cae705931 /views/default/account
parent16891673276e5cae6060aba6a8511dd4d2193321 (diff)
downloadelgg-b7f65ac7ac3f39728ea5c4e5ba4ebbe285989723.tar.gz
elgg-b7f65ac7ac3f39728ea5c4e5ba4ebbe285989723.tar.bz2
Updated private network (previously walled garden) login/register/lost password to be independent of any theme running, and improved interface.
git-svn-id: http://code.elgg.org/elgg/trunk@6323 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/account')
-rw-r--r--views/default/account/forms/login_walled_garden.php64
-rw-r--r--views/default/account/forms/register.php2
2 files changed, 38 insertions, 28 deletions
diff --git a/views/default/account/forms/login_walled_garden.php b/views/default/account/forms/login_walled_garden.php
index c889beff7..c7531efbd 100644
--- a/views/default/account/forms/login_walled_garden.php
+++ b/views/default/account/forms/login_walled_garden.php
@@ -24,9 +24,6 @@ if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
$login_url = str_replace("http", "https", $vars['url']);
}
?>
-<style type="text/css">
- body {background:white !important; text-align: center !important;}
-</style>
<h2><?php echo elgg_echo('login'); ?></h2>
<?php
echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
@@ -42,54 +39,67 @@ if ($CONFIG->allow_registration) {
));
echo <<<__HTML
-<div id="registration_form" class="registration_form margin_top hidden">
+<div id="registration_form" class="hidden clearfloat">
+<div id="hiddenform_body" class="clearfloat">
<h2>$title</h2>
$body
-</div>
+</div><div id="hiddenform_bottom"></div></div>
__HTML;
}
?>
-
-<div id="lostpassword_form" class="lostpassword_form margin_top hidden">
<?php
$lostpassword_form_body = "<p>" . elgg_echo('user:password:text') . "</p>";
$lostpassword_form_body .= "<p class='margin_none'><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>";
+ $lostpassword_form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "<input class='action_button disabled cancel_request' type='reset' value='Cancel'></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>
+<div id="lostpassword_form" class="hidden clearfloat">
+ <div id="hiddenform_body" class="clearfloat">
+ <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
+ ));
+ ?>
+</div><div id="hiddenform_bottom"></div></div>
<script type="text/javascript">
$(document).ready(function() {
$('input.username').focus();
+ // add cancel button to inline register form
+ $('#registration_form').find('input.submit_button').after("<input class='action_button disabled cancel_request' type='reset' value='Cancel'>");
+
+ 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 });
+ return false;
+ }
+
$('a.registration_link').click(function(e) {
e.preventDefault();
- if ($('#lostpassword_form').is(':visible')) {
- elgg_slide_toggle($('a.forgotten_password_link'), '.walledgardenlogin', '.lostpassword_form');
- }
-
- elgg_slide_toggle(this, '.walledgardenlogin', '.registration_form');
+ elgg_slide_hiddenform(this, '.walledgardenlogin', '#registration_form');
+ $('input.name').focus();
});
$('a.forgotten_password_link').click(function(e) {
e.preventDefault();
- if ($('#registration_form').is(':visible')) {
- elgg_slide_toggle($('a.registration_link'), '.walledgardenlogin', '.registration_form');
- }
-
- elgg_slide_toggle(this, '.walledgardenlogin', '.lostpassword_form');
+ elgg_slide_hiddenform(this, '.walledgardenlogin', '#lostpassword_form');
$('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();
+ }
+ return false;
+ });
});
</script>
diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php
index 819646bd5..fb9136ad8 100644
--- a/views/default/account/forms/register.php
+++ b/views/default/account/forms/register.php
@@ -19,7 +19,7 @@ if ($loggedin_user && $loggedin_user->isAdmin() && isset($vars['show_admin'])) {
$admin_option = true;
}
-$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "input_text", 'value' => $name)) . "</label></p>";
+$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "input_text name", 'value' => $name)) . "</label></p>";
$form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "input_text", 'value' => $email)) . "</label></p>";
$form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "input_text", 'value' => $username)) . "</label></p>";
$form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "input_password")) . "</label></p>";