equal
deleted
inserted
replaced
1 # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
143 # inlined form handling ######################################################## |
143 # inlined form handling ######################################################## |
144 |
144 |
145 class InlinedFormField(ff.Field): |
145 class InlinedFormField(ff.Field): |
146 def __init__(self, view=None, **kwargs): |
146 def __init__(self, view=None, **kwargs): |
147 kwargs.setdefault('label', None) |
147 kwargs.setdefault('label', None) |
|
148 # don't add eidparam=True since this field doesn't actually hold the |
|
149 # relation value (the subform does) hence should not be listed in |
|
150 # _cw_entity_fields |
148 super(InlinedFormField, self).__init__(name=view.rtype, role=view.role, |
151 super(InlinedFormField, self).__init__(name=view.rtype, role=view.role, |
149 eidparam=True, **kwargs) |
152 **kwargs) |
150 self.view = view |
153 self.view = view |
151 |
154 |
152 def render(self, form, renderer): |
155 def render(self, form, renderer): |
153 """render this field, which is part of form, using the given form |
156 """render this field, which is part of form, using the given form |
154 renderer |
157 renderer |