From 28866b6c60820746622d358ee38a08272851579a Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 22 Feb 2011 00:22:41 +0000 Subject: Extracted input/form login from forms/useradd git-svn-id: http://code.elgg.org/elgg/trunk@8395 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/admin/users/add.php | 5 +++- views/default/forms/useradd.php | 51 +++++++++++++++++++++------------------ 2 files changed, 31 insertions(+), 25 deletions(-) (limited to 'views/default') diff --git a/views/default/admin/users/add.php b/views/default/admin/users/add.php index 83cad6106..6d22b9c29 100644 --- a/views/default/admin/users/add.php +++ b/views/default/admin/users/add.php @@ -3,4 +3,7 @@ * Display an add user form. */ -echo elgg_view('forms/useradd', array('show_admin'=>true)); \ No newline at end of file +$title = elgg_echo('adduser'); +$body = elgg_view_form('useradd', array(), array('show_admin' => true)); + +echo elgg_view_module('inline', $title, $body); \ No newline at end of file diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php index 1119d180f..f4849618f 100644 --- a/views/default/forms/useradd.php +++ b/views/default/forms/useradd.php @@ -5,39 +5,42 @@ * @package Elgg * @subpackage Core * - * @todo FIXME Forms 1.8: views in the forms/ directory should not be generating the
wrapper itself */ $admin_option = false; if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) { $admin_option = true; } +?> +
+
+ 'name')); ?> +
+
+
+ 'username')); ?> +
+
+
+ 'email')); ?> +
+
+
+ 'password')); ?> +
+
+
+ 'password2')); ?> +
-$form_body = "

" . elgg_view('input/text' , array('name' => 'name')) . "
"; -$form_body .= "

" . elgg_view('input/text' , array('name' => 'username')) . "
"; -$form_body .= "

" . elgg_view('input/text' , array('name' => 'email')) . "
"; -$form_body .= "

" . elgg_view('input/password' , array('name' => 'password')) . "
"; -$form_body .= "

" . elgg_view('input/password' , array('name' => 'password2')) . "
"; -$form_body .= "
"; - + "admin", 'options' => array(elgg_echo('admin_option')))); - $form_body .= '
'; + echo "
"; + echo elgg_view('input/checkboxes', array('name' => "admin", 'options' => array(elgg_echo('admin_option')))); + echo "
"; } - -$form_body .= elgg_view('input/submit', array('name' => 'submit', 'value' => elgg_echo('register'))) . "
"; ?> -
-
-

-
-
- "action/useradd", - 'body' => $form_body, - )); - ?> -
+
+ 'submit', 'value' => elgg_echo('register'))); ?>
\ No newline at end of file -- cgit v1.2.3