nextcloud/admin/templates/users.php

117 lines
3.8 KiB
PHP
Raw Normal View History

<h2>Users</h2>
<table id="usertable">
<thead>
<tr>
2011-06-20 00:15:38 +04:00
<th><?php echo $l->t( 'Name' ); ?></th>
2011-06-20 20:51:06 +04:00
<th><?php echo $l->t( '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">
2011-06-20 00:15:38 +04:00
<td><button id="createuseroptionbutton"><?php echo $l->t( 'Add user' ); ?></button></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<form id="createuserdata">
<tr id="createuserform" style="display:none;">
<td>
2011-06-20 00:15:38 +04:00
<?php echo $l->t( 'Name' ); ?> <input x-use="createuserfield" type="text" name="username" /><br>
<?php echo $l->t( '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>
2011-06-20 00:15:38 +04:00
<button id="createuserbutton"><?php echo $l->t( 'Create user' ); ?></button>
</td>
</tr>
</form>
</tfoot>
<tbody>
<?php foreach($_["users"] as $user): ?>
<tr x-uid="<?php echo $user["name"] ?>">
<td x-use="username"><div x-use="usernamediv"><?php echo $user["name"]; ?></div></td>
<td x-use="usergroups"><div x-use="usergroupsdiv"><?php if( $user["groups"] ){ echo $user["groups"]; }else{echo "&nbsp";} ?></div></td>
2011-06-20 00:15:38 +04:00
<td><a class="removeuserbutton" href=""><?php echo $l->t( 'remove' ); ?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
2011-06-20 00:15:38 +04:00
<h2><?php echo $l->t( 'Groups' ); ?></h2>
<table id="grouptable">
<thead>
<tr>
2011-06-20 00:15:38 +04:00
<th><?php echo $l->t( 'Name' ); ?></th>
<th></th>
</tr>
</thead>
<tfoot>
<form id="creategroupdata">
<tr>
<td><input x-use="creategroupfield" type="text" name="groupname" /></td>
2011-06-20 00:15:38 +04:00
<td><button id="creategroupbutton"><?php echo $l->t( 'Create group' ); ?></button></td>
</tr>
</form>
</tfoot>
<tbody>
<?php foreach($_["groups"] as $group): ?>
<tr x-gid="<?php echo $group["name"]; ?>">
<td><?php echo $group["name"] ?></td>
2011-04-18 14:39:28 +04:00
<td>
<?php if( $group["name"] != "admin" ): ?>
2011-06-20 00:15:38 +04:00
<a class="removegroupbutton" href=""><?php echo $l->t( 'remove' ); ?></a>
2011-04-18 14:39:28 +04:00
<?php else: ?>
&nbsp;
<?php endif; ?>
</td>
2011-04-17 03:04:23 +04:00
</tr>
<?php endforeach; ?>
</tbody>
</table>
2011-04-16 16:59:10 +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="" />
2011-06-20 00:15:38 +04:00
<?php echo $l->t( 'Force new password:' ); ?>
<input id="changepasswordpwd" type="password" name="password" value="" />
2011-06-20 00:15:38 +04:00
<button id="changepasswordbutton"><?php echo $l->t( 'Set' ); ?></button>
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">
2011-06-20 00:15:38 +04:00
<?php echo $l->t( '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">
2011-06-20 00:15:38 +04:00
<?php echo $l->t( '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>
2011-04-18 14:39:28 +04:00
<div id="errordialog" title="Error">
<span id="errormessage"></span>
</div>