From 5e64ec8b2205873610028682d22ff3c4043e87a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 10 Jul 2017 09:54:00 +0200 Subject: [PATCH] strasbourg: add warning about repeated parts --- strasbourg/reprise.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/strasbourg/reprise.py b/strasbourg/reprise.py index 7b72d44..af08802 100644 --- a/strasbourg/reprise.py +++ b/strasbourg/reprise.py @@ -56,6 +56,13 @@ first_fieldset = True def process_children(node): global field_id, first_fieldset + if 'repeat' in node.attrib: + formdef.fields.append(fields.CommentField(id=str(field_id), + type='comment', + label='

!!! Attention info qui peut se répéter plusieurs fois sur le formulaire d\'origine. (tableau de longueur libre possible ?)

')) + print '!!! fieldset repeat' + field_id += 1 + children_nodes = node.getchildren() for field_node in children_nodes: field_id += 1 @@ -68,8 +75,6 @@ def process_children(node): formdef.fields.append(fields.CommentField(id=str(field_id), type='comment', label='
%s
' % fix_encoding(field_node.text))) continue if field_node.tag == 'fieldset': - if 'repeat' in field_node.attrib: - print '!!! fieldset repeat' try: if first_fieldset: first_fieldset = False