Skip to content

Commit

Permalink
Update remaining implementers of the IForm interface with the new (op…
Browse files Browse the repository at this point in the history
…tional) prefix argument.
  • Loading branch information
malthe committed Nov 5, 2012
1 parent 219af1c commit ebc98a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/z3c/form/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ def __init__(self, context, request, parentForm):
self.request = request
self.parentForm = self.__parent__ = parentForm

def updateWidgets(self):
def updateWidgets(self, prefix=None):
'''See interfaces.IForm'''
for attrName in ('mode', 'ignoreRequest', 'ignoreContext',
'ignoreReadonly'):
value = getattr(self.parentForm.widgets, attrName)
setattr(self.widgets, attrName, value)
if prefix is not None:
self.widgets.prefix = prefix
self.widgets.update()

def update(self):
Expand Down Expand Up @@ -119,9 +121,9 @@ def applyChanges(self, data):

return changed

def updateWidgets(self):
def updateWidgets(self, prefix=None):
'''See interfaces.IForm'''
super(GroupForm, self).updateWidgets()
super(GroupForm, self).updateWidgets(prefix=prefix)

groups = []
for groupClass in self.groups:
Expand Down

0 comments on commit ebc98a1

Please sign in to comment.