[Checkins] SVN: zope3org/trunk/src/zorg/multiform/ update

Bernd Dorn bernd.dorn at fhv.at
Tue Apr 11 05:30:16 EDT 2006


Log message for revision 66839:
  update

Changed:
  U   zope3org/trunk/src/zorg/multiform/actions.txt
  U   zope3org/trunk/src/zorg/multiform/multiform.py

-=-
Modified: zope3org/trunk/src/zorg/multiform/actions.txt
===================================================================
--- zope3org/trunk/src/zorg/multiform/actions.txt	2006-04-11 09:25:29 UTC (rev 66838)
+++ zope3org/trunk/src/zorg/multiform/actions.txt	2006-04-11 09:30:15 UTC (rev 66839)
@@ -37,13 +37,13 @@
     ...         render_context=True)
     ...     
     ...     @multiform.parentAction(u"Save",
-    ...     condition=multiform.isParentFormInputMode,inputMode=True)
+    ...     condition=multiform.anySubFormInputMode,inputMode=True)
     ...     def handle_save_action(self, action, data):
     ...         form.applyChanges(self.context, self.form_fields,
     ...         data, self.adapters)
     ...         self.newInputMode = False
     ...         
-    ...     @form.action(u"Upper", condition=multiform.isParentFormDisplayMode)
+    ...     @form.action(u"Upper", condition=multiform.allSubFormsDisplayMode)
     ...     def handle_uppercase_action(self, action, data):
     ...			self.context.name = self.context.name.upper()
     ...			
@@ -66,7 +66,7 @@
     ...             res += '<div>%s</div>\n' % action.render()
     ...         return res
     ...     
-    ...     @form.action('Edit',condition=multiform.allSubFormDisplayMode)
+    ...     @form.action('Edit',condition=multiform.allSubFormsDisplayMode)
     ...     def handle_edit_action(self, action, data):
     ...         for form in self.subForms.values():
     ...             form.newInputMode = True

Modified: zope3org/trunk/src/zorg/multiform/multiform.py
===================================================================
--- zope3org/trunk/src/zorg/multiform/multiform.py	2006-04-11 09:25:29 UTC (rev 66838)
+++ zope3org/trunk/src/zorg/multiform/multiform.py	2006-04-11 09:30:15 UTC (rev 66839)
@@ -20,18 +20,12 @@
 def isFormInputMode(f,action):
     return f.inputMode
 
-def isParentFormDisplayMode(f,action):
-    return not isParentFormInputMode(f,action)
-
-def isParentFormInputMode(f,action):
-    return (True in f.parentForm.subFormInputMode.values())
-
 def anySubFormInputMode(form,action):
     if not IMultiForm.providedBy(form):
         form = form.parentForm
     return (True in form.subFormInputMode.values())
 
-def allSubFormDisplayMode(form,action):
+def allSubFormsDisplayMode(form,action):
     if not IMultiForm.providedBy(form):
         form = form.parentForm
     return not (True in form.subFormInputMode.values())



More information about the Checkins mailing list