[Zope-CVS] CVS: Packages3/workflow/browser - definition.py:1.2
Ulrich Eck
ueck@net-labs.de
Wed, 5 Feb 2003 20:21:28 -0500
Update of /cvs-repository/Packages3/workflow/browser
In directory cvs.zope.org:/tmp/cvs-serv31928/browser
Modified Files:
definition.py
Log Message:
removed m$ line-endings ..
=== Packages3/workflow/browser/definition.py 1.1 => 1.2 ===
--- Packages3/workflow/browser/definition.py:1.1 Wed Feb 5 20:09:30 2003
+++ Packages3/workflow/browser/definition.py Wed Feb 5 20:20:55 2003
@@ -1,55 +1,55 @@
-##############################################################################
-#
-# Copyright (c) 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""ProcessDefinition configuration adding view
-
-$Id$
-"""
-__metaclass__ = type
-
-from zope.component import getServiceManager
-from zope.publisher.browser import BrowserView
-from zope.app.form.utility import setUpWidgets, getWidgetsDataForContent
-from zope.app.interfaces.workflow import IProcessDefinitionConfiguration
-from zope.app.interfaces.workflow import IProcessDefinition
-from zope.app.workflow.service import ProcessDefinitionConfiguration
-
-class AddProcessDefinitionConfiguration(BrowserView):
-
- def __init__(self, *args):
- super(AddProcessDefinitionConfiguration, self).__init__(*args)
- setUpWidgets(self, IProcessDefinitionConfiguration)
-
- def components(self):
- service = getServiceManager(self.context.context)
- paths = [info['path']
- for info in service.queryComponent(type=IProcessDefinition)]
- paths.sort()
- return paths
-
- def action(self, definition_name, component_path=None):
- if not definition_name:
- raise ValueError('You must specify a ProcessDefinition name')
- if not component_path:
- raise ValueError('You must specify a component path')
- cd = ProcessDefinitionConfiguration(definition_name, component_path)
- cd = self.context.add(cd)
- getWidgetsDataForContent(self, IProcessDefinitionConfiguration, content=cd)
- self.request.response.redirect(self.context.nextURL())
-
-
-
-class ProcessDefinitionView(BrowserView):
-
- def getName(self):
- return """I'm a dummy ProcessInstance"""
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""ProcessDefinition configuration adding view
+
+$Id$
+"""
+__metaclass__ = type
+
+from zope.component import getServiceManager
+from zope.publisher.browser import BrowserView
+from zope.app.form.utility import setUpWidgets, getWidgetsDataForContent
+from zope.app.interfaces.workflow import IProcessDefinitionConfiguration
+from zope.app.interfaces.workflow import IProcessDefinition
+from zope.app.workflow.service import ProcessDefinitionConfiguration
+
+class AddProcessDefinitionConfiguration(BrowserView):
+
+ def __init__(self, *args):
+ super(AddProcessDefinitionConfiguration, self).__init__(*args)
+ setUpWidgets(self, IProcessDefinitionConfiguration)
+
+ def components(self):
+ service = getServiceManager(self.context.context)
+ paths = [info['path']
+ for info in service.queryComponent(type=IProcessDefinition)]
+ paths.sort()
+ return paths
+
+ def action(self, definition_name, component_path=None):
+ if not definition_name:
+ raise ValueError('You must specify a ProcessDefinition name')
+ if not component_path:
+ raise ValueError('You must specify a component path')
+ cd = ProcessDefinitionConfiguration(definition_name, component_path)
+ cd = self.context.add(cd)
+ getWidgetsDataForContent(self, IProcessDefinitionConfiguration, content=cd)
+ self.request.response.redirect(self.context.nextURL())
+
+
+
+class ProcessDefinitionView(BrowserView):
+
+ def getName(self):
+ return """I'm a dummy ProcessInstance"""