1
0
forked from ScoDoc/ScoDoc

Fix: moduleimpl_status ordre des partitions

This commit is contained in:
viennet 2020-12-26 00:39:45 +01:00
parent ea388ea494
commit 0864917a5f

View File

@ -262,7 +262,11 @@ def moduleimpl_status(context, moduleimpl_id=None, partition_id=None, REQUEST=No
H.append( H.append(
"""Afficher les groupes de&nbsp;<select name="partition_id" onchange="document.f.submit();">""" """Afficher les groupes de&nbsp;<select name="partition_id" onchange="document.f.submit();">"""
) )
been_selected = False
for partition in partitions: for partition in partitions:
if not partition_id and not been_selected:
selected = "selected"
been_selected = True
if partition["partition_id"] == partition_id: if partition["partition_id"] == partition_id:
selected = "selected" selected = "selected"
else: else:
@ -270,8 +274,6 @@ def moduleimpl_status(context, moduleimpl_id=None, partition_id=None, REQUEST=No
name = partition["partition_name"] name = partition["partition_name"]
if name is None: if name is None:
name = "Tous" name = "Tous"
if not partition_id:
selected = "selected"
H.append( H.append(
"""<option value="%s" %s>%s</option>""" """<option value="%s" %s>%s</option>"""
% (partition["partition_id"], selected, name) % (partition["partition_id"], selected, name)