mirror of https://github.com/Aidaho12/haproxy-wi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
3.2 KiB
96 lines
3.2 KiB
{% from 'include/input_macros.html' import input, checkbox %}
|
|
{% if not adding %}
|
|
<table class="overview" id="ajax-users">
|
|
<thead>
|
|
<tr class="overviewHead">
|
|
<th class="padding10 first-collumn">Login</th>
|
|
<th style="width: 10%">Password</th>
|
|
<th style="width: 10%">Active</th>
|
|
<th style="width: 20%">Email</th>
|
|
<th style="width: 10%">Role</th>
|
|
{% if page != "servers.py" %}
|
|
<th style="width: 10%">Group</th>
|
|
{% endif %}
|
|
<th style="width: 100%">Services</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% endif %}
|
|
{% for user in users %}
|
|
<tr id="user-{{user.user_id}}" class="{{ loop.cycle('odd', 'even') }} {% if adding %}newuser{% endif %}">
|
|
<td class="padding10 first-collumn">
|
|
{% set login_id = 'login-' + user.user_id|string() %}
|
|
{% if user.6 == 1%}
|
|
{{ input(login_id, value=user.username, readonly='readonly') }}
|
|
{% else %}
|
|
{{ input(login_id, value=user.username) }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if user.6 != 1%}
|
|
<span title="Change password" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserPasswordDialog('{{user.user_id}}')">
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td class="checkbox">
|
|
{% set activeuser_id = 'activeuser-' + user.user_id|string() %}
|
|
{% if user.activeuser == 1 %}
|
|
{{ checkbox(activeuser_id, checked='checked') }}
|
|
{% else %}
|
|
{{ checkbox(activeuser_id) }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% set email_id = 'email-' + user.user_id|string() %}
|
|
{% if user.ldap_user == 1%}
|
|
{{ input(email_id, value=user.email, readonly='readonly') }}
|
|
{% else %}
|
|
{{ input(email_id, value=user.email, type='email') }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<select id="role-{{user.user_id}}" name="role-{{user.user_id}}">
|
|
<option disabled selected>Select a role</option>
|
|
{% for r in roles %}
|
|
{% if page == "servers.py" %}
|
|
{% if r.name != "superAdmin" %}
|
|
{% if user.role == r.name %}
|
|
<option value="{{ r.name }}" selected>{{ r.name }}</option>
|
|
{% else %}
|
|
<option value="{{ r.name }}">{{ r.name }}</option>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% else %}
|
|
{% if user.role == r.name %}
|
|
<option value="{{ r.name }}" selected>{{ r.name }}</option>
|
|
{% else %}
|
|
<option value="{{ r.name }}">{{ r.name }}</option>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</td>
|
|
{% if page != "servers.py" %}
|
|
<td>
|
|
<span title="Change user groups" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserGroupDialog('{{user.user_id}}')">
|
|
</td>
|
|
{% endif %}
|
|
<td>
|
|
<span title="Change user groups" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserServiceDialog('{{user.user_id}}')">
|
|
</td>
|
|
<td>
|
|
<a class="add" onclick="cloneUser({{user.user_id}})" id="clone-{{user.user_id}}" title="Clone {{user.1}}" style="cursor: pointer;"></a>
|
|
</td>
|
|
<td>
|
|
<a class="delete" onclick="confirmDeleteUser({{user.user_id}})" title="Delete user {{user.1}}" style="cursor: pointer;"></a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% if not adding %}
|
|
<tbody>
|
|
</table>
|
|
<br /><span class="add-button" title="Add user" id="add-user-button">+ Add</span>
|
|
<br /><br />
|
|
{% endif %} |