[Zope3-checkins] CVS: Zope3/src/zope/app/browser/workflow/stateful
- contentworkflow.py:1.7.32.1 definition.py:1.8.28.1
instance.py:1.10.28.1
Garrett Smith
garrett at mojave-corp.com
Thu Feb 26 00:11:24 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/browser/workflow/stateful
In directory cvs.zope.org:/tmp/cvs-serv25181/src/zope/app/browser/workflow/stateful
Modified Files:
Tag: garrett-widgets2-branch
contentworkflow.py definition.py instance.py
Log Message:
Yet another branch for widgets refactoring (YABFWR).
=== Zope3/src/zope/app/browser/workflow/stateful/contentworkflow.py 1.7 => 1.7.32.1 ===
--- Zope3/src/zope/app/browser/workflow/stateful/contentworkflow.py:1.7 Thu Aug 21 16:10:30 2003
+++ Zope3/src/zope/app/browser/workflow/stateful/contentworkflow.py Thu Feb 26 00:10:53 2004
@@ -20,6 +20,7 @@
from zope.app.i18n import ZopeMessageIDFactory as _
from zope.app.form.utility import setUpWidgets
from zope.app.services.servicenames import Workflows
+from zope.app.interfaces.form import IEditWidget
from zope.component import getService
from zope.interface import Interface
from zope.publisher.browser import BrowserView
@@ -56,7 +57,7 @@
def __init__(self, *args):
super(ManageContentProcessRegistry, self).__init__(*args)
- setUpWidgets(self, IContentProcessMapping)
+ setUpWidgets(self, IContentProcessMapping, IEditWidget)
self.process_based = int(self.request.get('process_based', '1'))
def getProcessInterfacesMapping(self):
=== Zope3/src/zope/app/browser/workflow/stateful/definition.py 1.8 => 1.8.28.1 ===
--- Zope3/src/zope/app/browser/workflow/stateful/definition.py:1.8 Sun Sep 21 13:30:42 2003
+++ Zope3/src/zope/app/browser/workflow/stateful/definition.py Thu Feb 26 00:10:53 2004
@@ -82,6 +82,7 @@
title=u"Accessor Permission",
default=CheckerPublic,
required=False)
+ # XXX OZ
setUpWidget(self, name+'_get_perm', permField, value=get_perm)
# Create the Mutator Permission Widget for this field
@@ -90,6 +91,7 @@
title=u"Mutator Permission",
default=CheckerPublic,
required=False)
+ # XXX OZ
setUpWidget(self, name+'_set_perm', permField, value=set_perm)
def update(self):
=== Zope3/src/zope/app/browser/workflow/stateful/instance.py 1.10 => 1.10.28.1 ===
--- Zope3/src/zope/app/browser/workflow/stateful/instance.py:1.10 Sun Sep 21 13:31:12 2003
+++ Zope3/src/zope/app/browser/workflow/stateful/instance.py Thu Feb 26 00:10:53 2004
@@ -44,6 +44,7 @@
for name, field in getFields(schema).items():
# setUpWidget() does not mutate the field, so it is ok.
field = trustedRemoveSecurityProxy(field)
+ # XXX OZ
setUpWidget(self, name, field,
value=getattr(workflow.data, name))
@@ -139,9 +140,8 @@
if Update in self.request and workflow.data is not None:
schema = trustedRemoveSecurityProxy(workflow.data.getSchema())
- changed = applyWidgetsChanges(
- self, workflow.data, schema, names=getFields(schema).keys(),
- exclude_readonly=True)
+ changed = applyWidgetsChanges(self, schema,
+ names=getFields(schema).keys(), context=workflow.data)
if changed:
status = _('Updated Workflow Data.')
More information about the Zope3-Checkins
mailing list