nextcloud/admin/templates/users.php

104 lines
2.9 KiB
PHP
Raw Normal View History

<h2>Users</h2>
<table id="usertable">
<thead>
<tr>
<th>Name</th>
<th>Groups</th>
2011-04-16 16:59:10 +04:00
<th></th>
</tr>
2011-04-17 01:26:55 +04:00
</thead>
<tfoot>
<tr id="createuseroption">
<td><button id="createuseroptionbutton">Add user</button></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<form id="createuserdata">
<tr id="createuserform" style="display:none;">
<td>
Name <input x-use="createuserfield" type="text" name="username" /><br>
Password <input x-use="createuserfield" type="password" name="password" />
</td>
<td id="createusergroups">
<?php foreach($_["groups"] as $i): ?>
<input x-use="createusercheckbox" x-gid="<? echo $i["name"]; ?>" type="checkbox" name="groups[]" value="<? echo $i["name"]; ?>" />
<span x-gid="<? echo $i["name"]; ?>"><? echo $i["name"]; ?><br></span>
<?php endforeach; ?>
</td>
<td>
<button id="createuserbutton">Create user</button>
</td>
</tr>
</form>
</tfoot>
<tbody>
<?php foreach($_["users"] as $user): ?>
<tr>
<td><?php echo $user["name"]; ?></td>
<td x-use="usergroups"><?php echo $user["groups"]; ?></td>
<td x-uid="<?php echo $user["name"] ?>"><a href="" class="edituserbutton">edit</a> | <a class="removeuserbutton" href="">remove</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<h2>Groups</h2>
<table id="grouptable">
<thead>
<tr>
<th>Name</th>
<th></th>
</tr>
</thead>
<tfoot>
<form id="creategroupdata">
<tr>
<td><input x-use="creategroupfield" type="text" name="groupname" /></td>
<td><button id="creategroupbutton">Create group</button></td>
</tr>
</form>
</tfoot>
<tbody>
<?php foreach($_["groups"] as $group): ?>
2011-04-17 03:04:23 +04:00
<tr>
<td><?php echo $group["name"] ?></td>
<td x-gid="<?php echo $group["name"]; ?>"><a class="removegroupbutton" href="">remove</a></td>
2011-04-17 03:04:23 +04:00
</tr>
<?php endforeach; ?>
</tbody>
</table>
2011-04-16 16:59:10 +04:00
<div id="edituserform" title="Force new password">
<form id="edituserdata">
<span id="edituserusername">$user</span><br>
2011-04-17 01:26:55 +04:00
<fieldset>
New password:
<input type="password" name="password" value="" />
2011-04-17 01:26:55 +04:00
</fieldset>
<input type="hidden" name="username" value="" />
<fieldset id="editusergroups">
<?php foreach($_["groups"] as $i): ?>
<input x-gid="<? echo $i["name"]; ?>" type="checkbox" name="groups[]" value="<? echo $i["name"]; ?>" />
<span x-gid="<? echo $i["name"]; ?>"><? echo $i["name"]; ?><br></span>
<?php endforeach; ?>
2011-04-17 01:26:55 +04:00
</fieldset>
2011-04-16 16:59:10 +04:00
</form>
</div>
<div id="removeuserform" title="Remove user">
2011-04-17 01:26:55 +04:00
<form id="removeuserdata">
Do you really want to delete user <span id="deleteuserusername">$user</span>?
2011-04-17 03:04:23 +04:00
<input id="deleteusernamefield" type="hidden" name="username" value="">
2011-04-17 01:26:55 +04:00
</form>
2011-04-16 16:59:10 +04:00
</div>
<div id="removegroupform" title="Remove Group">
2011-04-17 03:04:23 +04:00
<form id="removegroupdata">
Do you really want to delete group <span id="removegroupgroupname">$group</span>?
<input id="removegroupnamefield" type="hidden" name="groupname" value="">
2011-04-17 01:26:55 +04:00
</form>
2011-04-16 16:59:10 +04:00
</div>