[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - add.py:1.7 editview.py:1.9
Jim Fulton
jim@zope.com
Fri, 7 Feb 2003 10:49:08 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv23045/browser/form
Modified Files:
add.py editview.py
Log Message:
Cleaned up the layout of the browser configuration a bit.
Moved some container traversal browser configs from zope.app.container
to zope.app.browser.
=== Zope3/src/zope/app/browser/form/add.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/form/add.py:1.6 Mon Jan 27 20:50:14 2003
+++ Zope3/src/zope/app/browser/form/add.py Fri Feb 7 10:48:38 2003
@@ -40,8 +40,7 @@
to be edited.
"""
- def __init__(self, context, request):
- super(EditView, self).__init__(context, request)
+ def _setUpWidgets(self):
setUpWidgets(self, self.schema, names=self.fieldNames)
def apply_update(self, data):
@@ -193,7 +192,7 @@
return [
Action(
- discriminator = ('http://namespaces.zope.org/form/add', name, layer),
+ discriminator = ('view', IAdding, name, IBrowserPresentation, layer),
callable = AddViewFactory,
args = (name, schema, label, permission, layer, template, 'add.pt',
bases,
=== Zope3/src/zope/app/browser/form/editview.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/browser/form/editview.py:1.8 Mon Jan 27 23:57:30 2003
+++ Zope3/src/zope/app/browser/form/editview.py Fri Feb 7 10:48:38 2003
@@ -53,7 +53,11 @@
def __init__(self, context, request):
super(EditView, self).__init__(context, request)
+ self._setUpWidgets()
+
+ def _setUpWidgets(self):
setUpEditWidgets(self, self.schema, names=self.fieldNames)
+
def setPrefix(self, prefix):
for widget in self.widgets():
@@ -221,8 +225,7 @@
actions.append(
Action(
- discriminator = ('http://namespaces.zope.org/form/edit',
- name, for_, layer),
+ discriminator = ('view', for_, name, IBrowserPresentation, layer),
callable = EditViewFactory,
args = (name, schema, label, permission, layer, template, 'edit.pt',
bases,
@@ -244,8 +247,7 @@
return [
Action(
- discriminator = ('http://namespaces.zope.org/form/subedit',
- name, for_, layer),
+ discriminator = ('view', for_, name, IBrowserPresentation, layer),
callable = EditViewFactory,
args = (name, schema, label, permission, layer, template, 'subedit.pt',
bases,