[Checkins] SVN: zope3org/trunk/src/zorg/multiform/ fixed bug
Bernd Dorn
bernd.dorn at fhv.at
Tue Apr 11 05:00:02 EDT 2006
Log message for revision 66835:
fixed bug
Changed:
U zope3org/trunk/src/zorg/multiform/gridform.txt
U zope3org/trunk/src/zorg/multiform/multiform.py
-=-
Modified: zope3org/trunk/src/zorg/multiform/gridform.txt
===================================================================
--- zope3org/trunk/src/zorg/multiform/gridform.txt 2006-04-11 08:43:34 UTC (rev 66834)
+++ zope3org/trunk/src/zorg/multiform/gridform.txt 2006-04-11 09:00:02 UTC (rev 66835)
@@ -127,7 +127,7 @@
>>> print gf.subActionNames
[u'form.actions.edit']
>>> [a.__name__ for a in gf.availableSubActions()]
- [u'actions.edit']
+ [u'form.actions.edit']
Now we are going to select some items. And the checkbox of the ``selected``
@@ -149,7 +149,7 @@
</div>
By using the Edit action we can now switch all selected item forms to
-input mode.
+input mode.
>>> request = TestRequest()
>>> request.form['form.actions.edit']=u''
@@ -170,7 +170,11 @@
<div>1</div>
<div><input... name="form.n1.name" ...</div>
</div>
-
+
+Also the edit action should be disabled now.
+
+ >>> print gf.subActionNames
+
Now we test the actions which are displayed in each row.
>>> request = TestRequest()
Modified: zope3org/trunk/src/zorg/multiform/multiform.py
===================================================================
--- zope3org/trunk/src/zorg/multiform/multiform.py 2006-04-11 08:43:34 UTC (rev 66834)
+++ zope3org/trunk/src/zorg/multiform/multiform.py 2006-04-11 09:00:02 UTC (rev 66835)
@@ -258,11 +258,16 @@
return self.itemFormFactory(item,self.request,self)
def availableSubActions(self):
- for name in self.subActionNames:
- # remove the prefix of our form because, the actions in
- # the class variable have no prefix in their name
- name = name[len(self.prefix)+1:]
- yield self.itemFormFactory.actions.byname[name]
+ if self.subActionNames:
+ for name in self.subActionNames:
+ # remove the prefix of our form because, the actions in
+ # the class variable have no prefix in their name
+ actionName = name[len(self.prefix)+1:]
+ action = self.itemFormFactory.actions.byname[actionName]
+ action = copy.copy(action)
+ action.__name__ = name
+ yield action
+
class SelectionForm(form.FormBase):
More information about the Checkins
mailing list