ldap-frontend/ldap_frontend/templates/groups/members.html

46 lines
2 KiB
HTML

{% extends "layout/default.html" %}
{% block title %}group {{ ou }}{% endblock %}
{% block content %}
<table class="table table-hover align-middle">
<thead class="table-light">
<tr>
<th scope="col">uid</th>
<th scope="col">cn</th>
<th scope="col">remove</th>
</tr>
</thead>
<tbody>
{% for member in members|sort %}
<tr>
<th scope="row">{{ member["uid"] }}</th>
<td>{{ member["cn"] }}</td>
<td>
<form action="{{ url_for("group_edit", ou=ou) }}" method="post">
<input type="hidden" name="remove" value="{{ member["uid"] }}">
<input type="submit" value="remove" class="btn btn-danger">
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<form action="{{ url_for("group_edit", ou=ou) }}" method="post" class="row g-3 needs-validation">
<fieldset>
<legend>add user to group</legend>
<div class="row mb-3">
<label for="add" class="form-label col-sm-2">user</label>
<div class="col-sm-10">
<select name="add" id="add" class="form-select">
<option value="" selected>select user ...</option>
{% for user in other_users|sort %}
<option value="{{ user["uid"] }}">{{ user["cn"] }} ({{ user["uid"] }})</option>
{% endfor %}
</select>
</div>
</div>
<input type="submit" value="add user" class="btn btn-primary mb-3"><br>
</fieldset>
</form>
{% endblock %}