Commit 20c0a351 by wolf

Add user search in group settings

	modified:   Manager/Manager/templates/edit_group.html
parent 022fc6f6
{% extends "structure_group.html" %}
{% block body %}
<TABLE class='GroupForm'>
<script type="text/javascript">
function userChange () {
var searchedID = document.getElementById("ID").value.toLowerCase();
var rows = document.getElementsByClassName("userRow"); //get all row of the table
for(var i =0;i<rows.length;i++){ //for each row
row = rows[i]; = "none";
cells = row.getElementsByTagName('td');
id = cells[1].innerHTML.toLowerCase()
if (id.indexOf(searchedID)!=-1){ = null;
<TABLE class='GroupForm'>
<form action="{{ url_for('edit_group',id=id) }}" method=post>
{{ form.hidden_tag() }}
......@@ -9,16 +29,30 @@
<TD style="text-align:left;">
<label for="id">Identifiant : </label>
<!-- <div class='UserSearchForm'> -->
<input style="width:100%" type="text" value="" name="id" id="ID" onkeyup="userChange()";>
<!-- </div> -->
<TD class="userSelectionLabel">Utilisateurs : </TD>
<TD class="userSelectionElement">
{%for u in form.users%}
<a href="{{url_for('edit_user',id=u.object_data.__str__().split(",")[0].replace("cn=",""))}}">[Edit]</a>
<TR class="userRow">
<TD> {{u}} </TD>
<TD> {{u.label}} </TD>
<TD> <a href="{{url_for('edit_user',id=u.object_data.__str__().split(",")[0].replace("cn=",""))}}">[Edit]</a></TD>
{% endfor %}
<TD class=error>{% if form.errors.users%} {{form.errors.users[0]}} {%endif%}</TD>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment