File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -421,17 +421,25 @@ def is_TextTitleWidget(self, current_widget):
421
421
return isinstance (current_widget , TextTitleWidget )
422
422
423
423
def is_there_any_fields_after_this_title (self , current_widget , lst_widgets ):
424
+ # DEBUG
425
+ # if "Anecdotes" in current_widget.label:
426
+ # import pdb; pdb.set_trace()
424
427
if isinstance (lst_widgets , type (OrderedDict ().values ())):
425
428
lst_widgets = list (lst_widgets )
426
429
current_index = lst_widgets .index (current_widget )
427
430
if (
428
431
(current_index + 1 ) < len (lst_widgets )
429
- and lst_widgets [current_index + 1 ].value is not None
430
- and len ( lst_widgets [current_index + 1 ].value ) > 0
432
+ and lst_widgets [current_index ].value is not None
433
+ or lst_widgets [current_index ].value != ""
431
434
):
432
435
return True
433
- else :
436
+ elif (
437
+ lst_widgets [current_index + 1 ].value is None
438
+ and lst_widgets [current_index + 1 ].value == ""
439
+ ):
434
440
return False
441
+ else :
442
+ return True
435
443
436
444
def is_there_any_values (self , lst_widgets ):
437
445
if lst_widgets :
Original file line number Diff line number Diff line change 36
36
tal : content =" group/label" />
37
37
<tal : block tal : define =" values group/widgets/values" tal : repeat =" widget group/widgets/values" >
38
38
<tal : cond tal : condition =" python:view.is_TextTitleWidget(widget)" >
39
- <h2 tal : condition =" python:view.is_there_any_fields_after_this_title(widget, values)" tal : content =" structure widget" />
39
+ <div tal : condition =" python:view.is_there_any_fields_after_this_title(widget, values)" tal : content =" structure widget" />
40
40
</tal : cond >
41
41
<tal : cond tal : condition =" python:not view.is_TextTitleWidget(widget)" >
42
42
<tal : widget tal : condition =" widget/value" tal : replace =" structure widget/@@ploneform-render-widget" />
You can’t perform that action at this time.
0 commit comments