From a112284bc2420bb8cfb336857ad3d772cd0f3ed3 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 2 Apr 2011 01:30:30 +0000 Subject: Fixes #3233 useradd form is now sticky git-svn-id: http://code.elgg.org/elgg/trunk@8901 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/forms/useradd.php | 53 +++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 7 deletions(-) (limited to 'views') diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php index e2152e654..fcb93a6c6 100644 --- a/views/default/forms/useradd.php +++ b/views/default/forms/useradd.php @@ -7,6 +7,16 @@ * */ +$name = $username = $email = $password = $password2 = $admin = ''; + +if (elgg_is_sticky_form('useradd')) { + extract(elgg_get_sticky_values('useradd')); + elgg_clear_sticky_form('useradd'); + if (is_array($admin)) { + $admin = $admin[0]; + } +} + $admin_option = false; if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) { $admin_option = true; @@ -14,33 +24,62 @@ if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) { ?>

- 'name')); ?> + 'name', + 'value' => $name, + )); + ?>

- 'username')); ?> + 'username', + 'value' => $username, + )); + ?>

- 'email')); ?> + 'email', + 'value' => $email, + )); + ?>

- 'password')); ?> + 'password', + 'value' => $password, + )); + ?>

- 'password2')); ?> + 'password2', + 'value' => $password2, + )); + ?>
"; - echo elgg_view('input/checkboxes', array('name' => "admin", 'options' => array(elgg_echo('admin_option')))); + echo elgg_view('input/checkboxes', array( + 'name' => "admin", + 'options' => array(elgg_echo('admin_option') => 1), + 'value' => $admin, + )); echo ""; } ?>
- 'submit', 'value' => elgg_echo('register'))); ?> + elgg_echo('register'))); ?>
\ No newline at end of file -- cgit v1.2.3