mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
Permet de retirer un droit sans JS
This commit is contained in:
parent
22072ad641
commit
4c9477aa93
1 changed files with 13 additions and 4 deletions
|
@ -34,19 +34,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table class="table table-striped">
|
<table id="delRights_table" class="table table-striped">
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for key, values in userform.items %}
|
{% for key, values in userform.items %}
|
||||||
<tr class="active">
|
<tr class="active">
|
||||||
<td>
|
<td>
|
||||||
<a data-toggle="collapse" href="#collapseRight_{{key}}" aria-expanded="false" aria-controls="collapseRights_{{key}}">
|
<a data-toggle="collapse" href="#collapseRight_{{key}}" aria-expanded="true" aria-controls="collapseRights_{{key}}">
|
||||||
<b>{{ key }}</b> ( {{values.rights|length }} users )
|
<b>{{ key }}</b> ( {{values.rights|length }} users )
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="collapse" id="collapseRight_{{key}}">
|
<div class="collapse in" id="collapseRight_{{key}}">
|
||||||
<ul class="list-group" style="margin-bottom: 0px">
|
<ul class="list-group" style="margin-bottom: 0px">
|
||||||
{% for user in values.rights %}
|
{% for user in values.rights %}
|
||||||
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">{{ user }}</li>
|
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">{{ user }}</li>
|
||||||
|
@ -58,9 +58,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% bootstrap_button "Modifier" button_type="submit" icon="star" %}
|
{% bootstrap_button "Supprimer" button_type="submit" icon="star" %}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$("#delRights_table").ready( function () {
|
||||||
|
var rights_div = [{% for k in userform.keys %}$("#collapseRight_{{k}}"), {% endfor %}];
|
||||||
|
for (var i=0 ; i<rights_div.length ; i++) {
|
||||||
|
rights_div[i].collapse('hide');
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
</script>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Reference in a new issue