forked from ScoDoc/DocScoDoc
Merge pull request 'ameliioration placement (adapte la taille du select au contenu)' (#140) from jmplace/ScoDoc-Lille:placement_amelioration into master
Reviewed-on: https://scodoc.org/git/viennet/ScoDoc/pulls/140
This commit is contained in:
commit
1c927cb541
@ -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