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.
haproxy-wi/app/templates/ajax/new_user.html

56 lines
1.7 KiB

7 years ago
{% for user in users %}
<tr id="user-{{user.0}}" class="newuser">
{% include 'include/admin_users.html' %}
7 years ago
<td>
<select id="role-{{user.0}}" name="role-{{user.0}}">
<option disabled selected>Choose role</option>
{% for role in roles %}
{% if user.4 == role.1 %}
<option value="{{ role.1 }}" selected>{{ role.1 }}</option>
{% else %}
<option value="{{ role.1 }}">{{ role.1 }}</option>
{% endif %}
{% endfor %}
</select>
</td>
6 years ago
{% if page != "servers.py" %}
{% if page != "servers.py#users" %}
<td>
<span title="Change user groups" style="cursor: pointer; margin-left: 15px;" class="div-pic" onclick="openChangeUserGroupDialog('{{user.0}}')">
6 years ago
</td>
{% endif %}
{% endif %}
<td>
<a class="add" onclick="cloneUser({{user.0}})" id="clone-{{user.0}}" title="Clone {{user.1}}" style="cursor: pointer;"></a>
</td>
7 years ago
<td><a class="delete" onclick="removeUser({{user.0}})" style="cursor: pointer;"></a></td>
</tr>
<script>
$( function() {
$("#role-{{user.0}}" ).selectmenu({
width: 100
});
$("#usergroup-{{user.0}}" ).selectmenu({
width: 100
});
$( ".newuser" ).addClass( "update", 1000 );
$( "input[type=submit], button" ).button();
$( "input[type=checkbox]" ).checkboxradio();
$( "select" ).selectmenu();
$.getScript(awesome);
setTimeout(function() {
$( ".newuser" ).removeClass( "update" );
}, 2500 );
});
</script>
{% endfor %}
<script>
$( "#ajax-users input" ).change(function() {
var id = $(this).attr('id').split('-');
updateUser(id[1])
});
$( "#ajax-users select" ).on('selectmenuchange',function() {
var id = $(this).attr('id').split('-');
updateUser(id[1])
});
</script>