From 25bf2850a98d3f5784df9c998c906a118708c0be Mon Sep 17 00:00:00 2001 From: pete Date: Thu, 20 May 2010 13:35:10 +0000 Subject: Updated Register and ForgottenLogin forms to use default canvases. git-svn-id: http://code.elgg.org/elgg/trunk@6109 36083f99-b078-4883-b0ff-0f9b5a30f544 --- account/forgotten_password.php | 4 +++- account/register.php | 5 ++++- views/default/account/forms/forgotten_password.php | 18 ++++++------------ views/default/account/forms/register.php | 20 ++++++++------------ views/default/account/forms/useradd.php | 3 ++- 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 .= "

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

"; +echo elgg_view('input/form', array( + 'action' => "{$vars['url']}action/user/requestnewpassword", + 'body' => $form_body, + 'class' => "margin_top" +)); ?> - + \ 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 = "


"; - -$form_body .= "
"; -$form_body .= "
"; -$form_body .= "
"; -$form_body .= "
"; +$form_body = "

"; +$form_body .= "

"; +$form_body .= "

"; +$form_body .= "

"; +$form_body .= "

"; // 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'))) . "

"; + +echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body, 'class' => "margin_top")); ?> - + 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 .= "

"; $form_body .= "

"; $form_body .= "

"; +$form_body .= "

"; if ($admin_option) { - $form_body .= "

" . 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'))) . "

"; -- cgit v1.2.3