summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/users.html
blob: c4e65f4f906a11ce62e863c0df85bf1b99fa0739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends 'base.html' %}

{% block nav_users %}active{% endblock %}

{% block container %}
    <form id="usersForm">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
    </form>
    {{ super() }}
</form>
{% endblock %}

{% block sidebar %}
    <ul id="users-list" class="nav ogcp-nav flex-column nav-pills list-group">
        {% for user in users %}
            <li id="user-{{ user['USER'] }}" class="nav-item list-group-item d-flex align-items-center" style="padding-left: 35px;">
                <input class="form-check-input" type="checkbox" form="usersForm"
                       value="{{ user['USER'] }}"
                       name="user-{{ user['USER'] }}" />
                <i class="fas fa-user-circle fa-2x mr-2"></i>
                <b>{{ user['USER'] }}</b>
            </li>
        {% endfor %}
    </ul>
{% endblock %}

{% block commands %}
{% if current_user.is_authenticated %}
  <input class="btn btn-light {% block nav_user_add %}{% endblock %}" type="submit" value="{{ _('Add user') }}"
         form="usersForm" formaction="{{ url_for('user_add_get') }}" formmethod="get">
  <input class="btn btn-light {% block nav_user_edit %}{% endblock %}" type="submit" value="{{ _('Edit user') }}"
         form="usersForm" formaction="{{ url_for('user_edit_get') }}" formmethod="get">
  <input class="btn btn-light {% block nav_user_delete %}{% endblock %}" type="submit" value="{{ _('Delete user') }}"
         form="usersForm" formaction="{{ url_for('user_delete_get') }}" formmethod="get">
  {% if btn_back %}
    <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
      {{ _("Back") }}
    </button>
  {% endif %}
{% endif %}
{% endblock %}