aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-20 13:35:10 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-20 13:35:10 +0000
commit25bf2850a98d3f5784df9c998c906a118708c0be (patch)
treedca8c0ef922410dddf70ed987c005e4aeca74fed
parentd15c9fba5a5e15349f32aef641c67ea5902bfc8e (diff)
downloadelgg-25bf2850a98d3f5784df9c998c906a118708c0be.tar.gz
elgg-25bf2850a98d3f5784df9c998c906a118708c0be.tar.bz2
Updated Register and ForgottenLogin forms to use default canvases.
git-svn-id: http://code.elgg.org/elgg/trunk@6109 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--account/forgotten_password.php4
-rw-r--r--account/register.php5
-rw-r--r--views/default/account/forms/forgotten_password.php18
-rw-r--r--views/default/account/forms/register.php20
-rw-r--r--views/default/account/forms/useradd.php3
5 files changed, 23 insertions, 27 deletions
diff --git a/account/forgotten_password.php b/account/forgotten_password.php
index 3895d506f..fea2bc03f 100644
--- a/account/forgotten_password.php
+++ b/account/forgotten_password.php
@@ -11,7 +11,9 @@
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
if (!isloggedin()) {
- page_draw( elgg_echo('user:password:lost'), elgg_view("account/forms/forgotten_password") );
+ $area1 = elgg_view_title(elgg_echo("user:password:lost"));
+ $area2 = elgg_view("account/forms/forgotten_password");
+ page_draw(elgg_echo('user:password:lost'), elgg_view_layout("one_column_with_sidebar", $area1 . $area2));
} else {
forward();
} \ No newline at end of file
diff --git a/account/register.php b/account/register.php
index f96494000..1a6109762 100644
--- a/account/register.php
+++ b/account/register.php
@@ -31,7 +31,10 @@ $invitecode = get_input('invitecode');
// If we're not logged in, display the registration page
if (!isloggedin()) {
- page_draw(elgg_echo('register'), elgg_view("account/forms/register", array('friend_guid' => $friend_guid, 'invitecode' => $invitecode)));
+ $area1 = elgg_view_title(elgg_echo("register"));
+ $area2 = elgg_view("account/forms/register", array('friend_guid' => $friend_guid, 'invitecode' => $invitecode));
+ page_draw(elgg_echo("register"), elgg_view_layout("one_column_with_sidebar", $area1 . $area2));
+
// Otherwise, forward to the index page
} else {
forward();
diff --git a/views/default/account/forms/forgotten_password.php b/views/default/account/forms/forgotten_password.php
index 407f8e71c..9fe8e53a2 100644
--- a/views/default/account/forms/forgotten_password.php
+++ b/views/default/account/forms/forgotten_password.php
@@ -14,19 +14,13 @@ $form_body .= "<p><label>". elgg_echo('username') . " "
$form_body .= elgg_view('input/captcha');
$form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>";
+echo elgg_view('input/form', array(
+ 'action' => "{$vars['url']}action/user/requestnewpassword",
+ 'body' => $form_body,
+ 'class' => "margin_top"
+));
?>
-<div id="elgg_content" class="sidebar">
- <div id="elgg_page_contents" class="clearfloat forgotten_password">
- <h2><?php echo elgg_echo('user:password:lost'); ?></h2>
- <?php
- echo elgg_view('input/form', array(
- 'action' => "{$vars['url']}action/user/requestnewpassword",
- 'body' => $form_body,
- 'class' => "margin_top"
- ));
- ?>
- </div>
-</div>
+
<script type="text/javascript">
$(document).ready(function() { $('input[name=username]').focus(); });
</script> \ No newline at end of file
diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php
index 580922eb7..819646bd5 100644
--- a/views/default/account/forms/register.php
+++ b/views/default/account/forms/register.php
@@ -19,12 +19,11 @@ 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><br />";
-
-$form_body .= "<label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "input_text", 'value' => $email)) . "</label><br />";
-$form_body .= "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "input_text", 'value' => $username)) . "</label><br />";
-$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "input_password")) . "</label><br />";
-$form_body .= "<label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "input_password")) . "</label><br />";
+$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('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>";
+$form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "input_password")) . "</label></p>";
// view to extend to add more fields to the registration form
$form_body .= elgg_view('register/extend');
@@ -40,13 +39,10 @@ $form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', '
$form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
$form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register'));
$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
+
+echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body, 'class' => "margin_top"));
?>
-<div id="elgg_content" class="clearfloat sidebar">
- <div id="elgg_page_contents" class="clearfloat register">
- <h2><?php echo elgg_echo('register'); ?></h2>
- <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body, 'class' => "margin_top")) ?>
- </div>
-</div>
+
<script type="text/javascript">
$(document).ready(function() { $('input[name=name]').focus(); });
</script>
diff --git a/views/default/account/forms/useradd.php b/views/default/account/forms/useradd.php
index cf0dcd7ca..11323ab14 100644
--- a/views/default/account/forms/useradd.php
+++ b/views/default/account/forms/useradd.php
@@ -18,9 +18,10 @@ $form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input
$form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</label></p>";
$form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</label></p>";
$form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</label></p>";
+$form_body .= "<p>";
if ($admin_option) {
- $form_body .= "<p>" . elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
+ $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
}
$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";