aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 00:22:41 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 00:22:41 +0000
commit28866b6c60820746622d358ee38a08272851579a (patch)
treeca9744b9b76040ee4e43fcaf9c0e0fe553cde44d /views/default
parent00ea6e1ddd446c61c6ccd956989b4b9a1cd60119 (diff)
downloadelgg-28866b6c60820746622d358ee38a08272851579a.tar.gz
elgg-28866b6c60820746622d358ee38a08272851579a.tar.bz2
Extracted input/form login from forms/useradd
git-svn-id: http://code.elgg.org/elgg/trunk@8395 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/admin/users/add.php5
-rw-r--r--views/default/forms/useradd.php51
2 files changed, 31 insertions, 25 deletions
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 <form> wrapper itself
*/
$admin_option = false;
if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) {
$admin_option = true;
}
+?>
+<div>
+ <label><?php echo elgg_echo('name');?></label><br />
+ <?php echo elgg_view('input/text' , array('name' => 'name')); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('username'); ?></label><br />
+ <?php echo elgg_view('input/text' , array('name' => 'username')); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('email'); ?></label><br />
+ <?php elgg_view('input/text' , array('name' => 'email')); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('password'); ?></label><br />
+ <?php elgg_view('input/password' , array('name' => 'password')); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('passwordagain'); ?></label><br />
+ <?php elgg_view('input/password' , array('name' => 'password2')); ?>
+</div>
-$form_body = "<div><label>" . elgg_echo('name') . "</label><br />" . elgg_view('input/text' , array('name' => 'name')) . "</div>";
-$form_body .= "<div><label>" . elgg_echo('username') . "</label><br />" . elgg_view('input/text' , array('name' => 'username')) . "</div>";
-$form_body .= "<div><label>" . elgg_echo('email') . "</label><br />" . elgg_view('input/text' , array('name' => 'email')) . "</div>";
-$form_body .= "<div><label>" . elgg_echo('password') . "</label><br />" . elgg_view('input/password' , array('name' => 'password')) . "</div>";
-$form_body .= "<div><label>" . elgg_echo('passwordagain') . "</label><br />" . elgg_view('input/password' , array('name' => 'password2')) . "</div>";
-$form_body .= "<div>";
-
+<?php
if ($admin_option) {
- $form_body .= elgg_view('input/checkboxes', array('name' => "admin", 'options' => array(elgg_echo('admin_option'))));
- $form_body .= '</div><div>';
+ echo "<div>";
+ echo elgg_view('input/checkboxes', array('name' => "admin", 'options' => array(elgg_echo('admin_option'))));
+ echo "</div>";
}
-
-$form_body .= elgg_view('input/submit', array('name' => 'submit', 'value' => elgg_echo('register'))) . "</div>";
?>
-<div class="elgg-module elgg-module-inline">
- <div class="elgg-head">
- <h3><?php echo elgg_echo('adduser'); ?></h3>
- </div>
- <div class="elgg-body">
- <?php
- echo elgg_view('input/form', array(
- 'action' => "action/useradd",
- 'body' => $form_body,
- ));
- ?>
- </div>
+<div>
+ <?php echo elgg_view('input/submit', array('name' => 'submit', 'value' => elgg_echo('register'))); ?>
</div> \ No newline at end of file