forked from ScoDoc/ScoDoc
ameliioration placement (adapte la taille du select au contenu)
This commit is contained in:
parent
a447c6e5f9
commit
4a3e37d371
@ -88,10 +88,9 @@ def _get_group_info(evaluation_id):
|
||||
groups_tree[partition][group_name] = group_id
|
||||
if partition != TOUS:
|
||||
has_groups = True
|
||||
nb_groups = len(groups_tree)
|
||||
else:
|
||||
has_groups = False
|
||||
nb_groups = 1
|
||||
nb_groups = sum([len(groups_tree[p]) for p in groups_tree])
|
||||
return groups_tree, has_groups, nb_groups
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% macro render_field(field) %}
|
||||
<tr>
|
||||
<td class="wtf-field">{{ field.label }}</td>
|
||||
<td class="wtf-field">{{ field()|safe }}
|
||||
<td class="wtf-field">{{ field(**kwargs)|safe }}
|
||||
{% if field.errors %}
|
||||
<ul class=errors>
|
||||
{% for error in field.errors %}
|
||||
@ -27,7 +27,7 @@
|
||||
{{ render_field(form.nb_rangs) }}
|
||||
{{ render_field(form.etiquetage) }}
|
||||
{% if form.has_groups %}
|
||||
{{ render_field(form.groups) }}
|
||||
{{ render_field(form.groups, size=form.nb_groups) }}
|
||||
<!-- Tentative de recréer le choix des groupes sous forme de cases à cocher // demande à créer des champs wtf dynamiquement
|
||||
{% for partition in form.groups_tree %}
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user