diff options
-rw-r--r-- | views/default/admin/users/add.php | 5 | ||||
-rw-r--r-- | views/default/forms/useradd.php | 51 |
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 |