aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-26 14:03:44 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-26 14:03:44 +0000
commit440196f2a505d91937af3ee17ebb58d3a3702d1a (patch)
treead86ff4eecef0405fc107f8502879dd195541e2e /views/default
parentf750cdf33e7717fdb4fc6caf72361e76385fd6ae (diff)
downloadelgg-440196f2a505d91937af3ee17ebb58d3a3702d1a.tar.gz
elgg-440196f2a505d91937af3ee17ebb58d3a3702d1a.tar.bz2
Refs #96: Administration: Add user (with optional admin flag)
http://trac.elgg.org/elgg/ticket/96 git-svn-id: https://code.elgg.org/elgg/trunk@1146 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/account/forms/register.php12
-rw-r--r--views/default/admin/user.php2
-rw-r--r--views/default/admin/user_opt/adduser.php16
3 files changed, 29 insertions, 1 deletions
diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php
index 1d9421282..2305f18d1 100644
--- a/views/default/account/forms/register.php
+++ b/views/default/account/forms/register.php
@@ -10,7 +10,10 @@
* @copyright Curverider Ltd 2008
* @link http://elgg.org/
*/
-
+
+ $admin_option = false;
+ if (($_SESSION['user']->admin) && ($vars['show_admin']))
+ $admin_option = true;
?>
<h2><?php echo elgg_echo('register'); ?></h2>
@@ -21,6 +24,13 @@
<label><?php echo elgg_echo('username'); ?><br /><input name="username" type="text" class="general-textarea" /></label><br />
<label><?php echo elgg_echo('password'); ?><br /><input name="password" type="password" class="general-textarea" /></label><br />
<label><?php echo elgg_echo('passwordagain'); ?><br /><input name="password2" type="password" class="general-textarea" /></label><br />
+ <?php
+ if ($admin_option) {
+?>
+ <label><?php echo elgg_echo('admin_option'); ?><br /><input type="checkbox" name="admin" /></label>
+<?php
+ }
+ ?>
<input type="submit" name="submit" class="submit_button" value="<?php echo elgg_echo('register'); ?>" /></p>
<input type="hidden" name="action" value="register" />
</form>
diff --git a/views/default/admin/user.php b/views/default/admin/user.php
index 5cfc4adff..2e5445628 100644
--- a/views/default/admin/user.php
+++ b/views/default/admin/user.php
@@ -14,6 +14,8 @@
// Description of what's going on
echo "<p>" . nl2br(elgg_echo("admin:user:description")) . "</p>";
+ echo elgg_view("admin/user_opt/adduser");
+
echo elgg_view("admin/user_opt/search");
if ($vars['list']) echo $vars['list'];
diff --git a/views/default/admin/user_opt/adduser.php b/views/default/admin/user_opt/adduser.php
new file mode 100644
index 000000000..2891a98da
--- /dev/null
+++ b/views/default/admin/user_opt/adduser.php
@@ -0,0 +1,16 @@
+<?php
+ /**
+ * Add a user.
+ * Form to add a new user.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+?>
+
+
+<?php echo elgg_view('account/forms/register'); ?> \ No newline at end of file