[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - addwizard.py:1.10 editwizard.py:1.13 metaconfigure.py:1.4 metadirectives.py:1.7

Stuart Bishop zen at shangri-la.dropbear.id.au
Tue Aug 12 09:48:01 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv17603/src/zope/app/browser/form

Modified Files:
	addwizard.py editwizard.py metaconfigure.py metadirectives.py 
Log Message:
Make Wizards work again


=== Zope3/src/zope/app/browser/form/addwizard.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/browser/form/addwizard.py:1.9	Thu Aug  7 13:40:28 2003
+++ Zope3/src/zope/app/browser/form/addwizard.py	Tue Aug 12 08:47:55 2003
@@ -119,10 +119,10 @@
     class_.panes = panes
     class_.fieldNames = fields
     class_._factory = content_factory
-    class_._arguments = arguments
-    class_._keyword_arguments = keyword_arguments
-    class_._set_before_add = set_before_add
-    class_._set_after_add = set_after_add
+    class_._arguments = arguments or []
+    class_._keyword_arguments = keyword_arguments or []
+    class_._set_before_add = set_before_add or []
+    class_._set_after_add = set_after_add or []
     class_.use_session = use_session
 
     class_.generated_form = ViewPageTemplateFile(default_template)


=== Zope3/src/zope/app/browser/form/editwizard.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/browser/form/editwizard.py:1.12	Thu Aug  7 13:40:28 2003
+++ Zope3/src/zope/app/browser/form/editwizard.py	Tue Aug 12 08:47:55 2003
@@ -15,6 +15,7 @@
 
 $Id$
 """
+from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.component import getAdapter
 from zope.app.publisher.browser.globalbrowsermenuservice import \
@@ -210,12 +211,6 @@
                     out(widget.hidden())
             return ''.join(olist)
 
-
-class Pane:
-    # TODO: Add more funky stuff to each pane, such as a validator
-    def __init__(self, field_names, label):
-        self.names = field_names
-        self.label = label
 
 def EditWizardViewFactory(name, schema, permission, layer,
                     panes, fields, template, default_template, bases, for_, 


=== Zope3/src/zope/app/browser/form/metaconfigure.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/form/metaconfigure.py:1.3	Tue Aug  5 16:25:03 2003
+++ Zope3/src/zope/app/browser/form/metaconfigure.py	Tue Aug 12 08:47:55 2003
@@ -96,6 +96,14 @@
         return ('view', self.for_, self.name, IBrowserPresentation,
                 self.layer)
 
+class Pane:
+    ''' Holder for information about a Pane of a wizard '''
+    # TODO: Add more funky stuff to each pane, such as a validator
+    def __init__(self, field_names, label):
+        self.names = field_names
+        self.label = label
+
+
 class BaseWizardDirective(BaseFormDirective):
 
     # default wizard information
@@ -103,7 +111,7 @@
     use_sessions = True
 
     def __init__(self, _context, **kwargs):
-        super(AddWizardDirective, self).__init__(_context, **kwargs)
+        super(BaseWizardDirective, self).__init__(_context, **kwargs)
         self.panes = []
 
     def _args(self):


=== Zope3/src/zope/app/browser/form/metadirectives.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/form/metadirectives.py:1.6	Tue Aug  5 11:23:17 2003
+++ Zope3/src/zope/app/browser/form/metadirectives.py	Tue Aug 12 08:47:55 2003
@@ -194,7 +194,7 @@
         A list of fields to be assigned to the newly created object
         before it is added.""",
         required=False,
-        value_type=PythonIdentifier()        
+        value_type=PythonIdentifier(),
         )
 
     set_after_add = Tokens(
@@ -244,6 +244,13 @@
         title=u"Label",
         description=u"The label used as the heading on this pane",
         required=False,
+        )
+
+    fields = Tokens(
+        title=u"Fields",
+        description=u"The fields to display on this pane of the wizard",
+        required=True,
+        value_type=PythonIdentifier()
         )
 
 class IEditFormDirective(ICommonFormInformation):




More information about the Zope3-Checkins mailing list