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

49 lines
2.4 KiB
HTML
Raw Normal View History

2021-12-21 08:27:25 +00:00
{% extends "layout/default.html" %}
2021-12-23 08:14:27 +00:00
{% block title %}{% trans ou=ou %}group {{ ou }}{% endtrans %}{% endblock %}
2021-12-21 08:27:25 +00:00
{% block content %}
<table class="table table-hover align-middle">
<thead class="table-light">
<tr>
2021-12-23 08:14:27 +00:00
<th scope="col">{% trans %}uid{% endtrans %}</th>
<th scope="col">{% trans %}cn{% endtrans %}</th>
<th scope="col">{% trans %}remove member{% endtrans %}</th>
2021-12-21 08:27:25 +00:00
</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">
2021-12-21 15:57:39 +00:00
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
2021-12-21 08:27:25 +00:00
<input type="hidden" name="remove" value="{{ member["uid"] }}">
2021-12-23 08:14:27 +00:00
<input type="submit" value="{% trans %}remove{% endtrans %}" class="btn btn-danger">
2021-12-21 08:27:25 +00:00
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
2021-12-21 09:20:16 +00:00
<form action="{{ url_for("group_edit", ou=ou) }}" method="post" class="row g-3 needs-validation">
2021-12-21 15:57:39 +00:00
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
2021-12-21 09:20:16 +00:00
<fieldset>
2021-12-23 08:14:27 +00:00
<legend>{% trans %}add user to group{% endtrans %}</legend>
2021-12-21 09:20:16 +00:00
<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">
2021-12-23 08:14:27 +00:00
<option value="" selected>{% trans %}select user{% endtrans %}</option>
2021-12-21 09:20:16 +00:00
{% for user in other_users|sort %}
<option value="{{ user["uid"] }}">{{ user["cn"] }} ({{ user["uid"] }})</option>
{% endfor %}
</select>
</div>
</div>
2021-12-23 08:14:27 +00:00
<input type="submit" value="{% trans %}add user to group{% endtrans %}" class="btn btn-primary mb-3"><br>
2021-12-21 09:20:16 +00:00
</fieldset>
</form>
2021-12-21 08:27:25 +00:00
{% endblock %}