2011-03-02 01:20:16 +03:00
|
|
|
<h2>Users</h2>
|
|
|
|
|
2011-04-17 15:15:55 +04:00
|
|
|
<table id="usertable">
|
2011-03-02 01:20:16 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Groups</th>
|
2011-04-16 16:59:10 +04:00
|
|
|
<th></th>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tr>
|
2011-04-17 01:26:55 +04:00
|
|
|
</thead>
|
2011-04-17 15:15:55 +04:00
|
|
|
<tfoot>
|
|
|
|
<tr id="createuseroption">
|
|
|
|
<td><button id="createuseroptionbutton">Add user</button></td>
|
|
|
|
<td> </td>
|
|
|
|
<td> </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>
|
2011-03-02 01:20:16 +03:00
|
|
|
<tbody>
|
2011-03-09 22:13:52 +03:00
|
|
|
<?php foreach($_["users"] as $user): ?>
|
2011-04-17 20:05:49 +04:00
|
|
|
<tr x-uid="<?php echo $user["name"] ?>">
|
|
|
|
<td x-use="username"><span x-use="usernamespan"><?php echo $user["name"]; ?></span></td>
|
|
|
|
<td x-use="usergroups"><span x-use="usergroupsspan"><?php echo $user["groups"]; ?></span></td>
|
|
|
|
<td><a class="removeuserbutton" href="">remove</a></td>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tr>
|
2011-03-09 22:13:52 +03:00
|
|
|
<?php endforeach; ?>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h2>Groups</h2>
|
2011-04-17 15:15:55 +04:00
|
|
|
<table id="grouptable">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tfoot>
|
|
|
|
<form id="creategroupdata">
|
2011-03-02 01:20:16 +03:00
|
|
|
<tr>
|
2011-04-17 15:15:55 +04:00
|
|
|
<td><input x-use="creategroupfield" type="text" name="groupname" /></td>
|
|
|
|
<td><button id="creategroupbutton">Create group</button></td>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tr>
|
2011-04-17 15:15:55 +04:00
|
|
|
</form>
|
|
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($_["groups"] as $group): ?>
|
2011-04-17 20:05:49 +04:00
|
|
|
<tr x-gid="<?php echo $group["name"]; ?>">
|
2011-04-17 15:15:55 +04:00
|
|
|
<td><?php echo $group["name"] ?></td>
|
2011-04-17 20:05:49 +04:00
|
|
|
<td><a class="removegroupbutton" href="">remove</a></td>
|
2011-04-17 03:04:23 +04:00
|
|
|
</tr>
|
2011-04-17 15:15:55 +04:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2011-04-16 16:59:10 +04:00
|
|
|
|
2011-04-17 15:15:55 +04:00
|
|
|
|
|
|
|
|
2011-04-17 20:05:49 +04:00
|
|
|
<div id="changegroups" style="display:none">
|
|
|
|
<form id="changegroupsform">
|
|
|
|
<input id="changegroupuid" type="hidden" name="username" value="" />
|
|
|
|
<input id="changegroupgid" type="hidden" name="group" value="" />
|
|
|
|
<?php foreach($_["groups"] as $i): ?>
|
|
|
|
<input x-use="togglegroup" x-gid="<? echo $i["name"]; ?>" type="checkbox" name="groups[]" value="<? echo $i["name"]; ?>" />
|
|
|
|
<span x-use="togglegroup" x-gid="<? echo $i["name"]; ?>"><? echo $i["name"]; ?><br></span>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="changepassword" style="display:none">
|
|
|
|
<form id="changepasswordform">
|
|
|
|
<input id="changepassworduid" type="hidden" name="username" value="" />
|
|
|
|
Force new password:
|
|
|
|
<input id="changepasswordpwd" type="password" name="password" value="" />
|
|
|
|
<button id="changepasswordbutton">Set</button>
|
2011-04-16 16:59:10 +04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2011-04-17 15:15:55 +04:00
|
|
|
<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>
|
|
|
|
|
2011-04-17 15:15:55 +04:00
|
|
|
<div id="removegroupform" title="Remove Group">
|
2011-04-17 03:04:23 +04:00
|
|
|
<form id="removegroupdata">
|
2011-04-17 15:15:55 +04:00
|
|
|
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>
|