diff --git a/composer/schema/field.py b/composer/schema/field.py index 3e8d63b..e4ae831 100644 --- a/composer/schema/field.py +++ b/composer/schema/field.py @@ -43,9 +43,10 @@ from cybertools.util.format import toStr, toUnicode class FieldGroup(object): - def __init__(self, name, label): + def __init__(self, name, label, sublabels=[]): self.name = name self.label = label + self.sublabels = sublabels class Field(Component): diff --git a/composer/schema/grid/field.py b/composer/schema/grid/field.py index 1c4d272..c03ac55 100644 --- a/composer/schema/grid/field.py +++ b/composer/schema/grid/field.py @@ -57,12 +57,12 @@ class GridFieldInstance(ListFieldInstance): if group is None: result.append(dict(name=f.name, label=(f.description or f.title), - fields=[f], indexes=[idx])) + fields=[f], indexes=[idx], group=None)) else: g = groups.get(group.name) if g is None: g = dict(name=group.name, label=group.label, - fields=[f], indexes=[idx]) + fields=[f], indexes=[idx], group=group) groups[group.name] = g result.append(g) else: