[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_generic - join_form.py:1.2 members_manage_form.py:1.2 reconfig_form.py:1.3

Yvo Schubbe y.2005- at wcm-solutions.de
Tue Jan 25 14:50:12 EST 2005


Update of /cvs-repository/Products/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv24836/CMFDefault/skins/zpt_generic

Modified Files:
	join_form.py members_manage_form.py reconfig_form.py 
Log Message:
merged yuppie-new_actions-branch:
- added ActionCategory and Action interfaces
- added ActionCategory and Action classes
- modified ActionsTool to make use of these new classes
- removed deprecated 'name' and 'permissions' keys from ActionInfo
- allowed 'description' key in ActionInfo
- implemented IAction in the oldstyle ActionInformation class and used this interface to simplify ActionInfo
- updated setup handlers, tests, default profile and skins
- fixed ActionInfo issue regarding permissions in oldstyle action dicts


=== Products/CMFDefault/skins/zpt_generic/join_form.py 1.1 => 1.2 ===
--- Products/CMFDefault/skins/zpt_generic/join_form.py:1.1	Tue Jul  6 17:41:22 2004
+++ Products/CMFDefault/skins/zpt_generic/join_form.py	Tue Jan 25 14:49:42 2005
@@ -3,9 +3,9 @@
 from Products.CMFCore.utils import getToolByName
 from Products.CMFDefault.permissions import ManageUsers
 
+atool = getToolByName(script, 'portal_actions')
 mtool = getToolByName(script, 'portal_membership')
 ptool = getToolByName(script, 'portal_properties')
-rtool = getToolByName(script, 'portal_registration')
 utool = getToolByName(script, 'portal_url')
 portal_url = utool()
 validate_email = ptool.getProperty('validate_email')
@@ -18,10 +18,10 @@
 if add and \
         context.validatePassword(**form) and \
         context.members_add_control(**form) and \
-        context.setRedirect(rtool, 'user/join', b_start=b_start):
+        context.setRedirect(atool, 'user/join', b_start=b_start):
     return
 elif cancel and \
-        context.setRedirect(mtool, 'global/manage_members', b_start=b_start):
+        context.setRedirect(atool, 'global/manage_members', b_start=b_start):
     return
 
 
@@ -45,10 +45,10 @@
 
 buttons = []
 if is_newmember:
-    target = mtool.getActionInfo('user/logged_in')['url']
+    target = atool.getActionInfo('user/logged_in')['url']
     buttons.append( {'name': 'login', 'value': 'Log in'} )
 else:
-    target = rtool.getActionInfo('user/join')['url']
+    target = atool.getActionInfo('user/join')['url']
     buttons.append( {'name': 'add', 'value': 'Register'} )
     buttons.append( {'name': 'cancel', 'value': 'Cancel'} )
 options['form'] = { 'action': target,


=== Products/CMFDefault/skins/zpt_generic/members_manage_form.py 1.1 => 1.2 ===
--- Products/CMFDefault/skins/zpt_generic/members_manage_form.py:1.1	Tue Jul  6 17:41:22 2004
+++ Products/CMFDefault/skins/zpt_generic/members_manage_form.py	Tue Jan 25 14:49:42 2005
@@ -4,24 +4,24 @@
 from Products.CMFCore.utils import getToolByName
 from Products.CMFDefault.utils import html_marshal
 
+atool = getToolByName(script, 'portal_actions')
 mtool = getToolByName(script, 'portal_membership')
-rtool = getToolByName(script, 'portal_registration')
 
 
 form = context.REQUEST.form
 if members_delete and \
         context.validateMemberIds(**form) and \
         context.members_delete_control(**form) and \
-        context.setRedirect(mtool, 'global/manage_members', b_start=b_start):
+        context.setRedirect(atool, 'global/manage_members', b_start=b_start):
     return
 elif members_new and \
-        context.setRedirect(rtool, 'user/join', b_start=b_start):
+        context.setRedirect(atool, 'user/join', b_start=b_start):
     return
 
 
 options = {}
 
-target = mtool.getActionInfo('global/manage_members')['url']
+target = atool.getActionInfo('global/manage_members')['url']
 
 members = mtool.listMembers()
 batch_obj = Batch(members, 25, b_start, orphan=0)


=== Products/CMFDefault/skins/zpt_generic/reconfig_form.py 1.2 => 1.3 ===
--- Products/CMFDefault/skins/zpt_generic/reconfig_form.py:1.2	Sun Oct 17 16:03:54 2004
+++ Products/CMFDefault/skins/zpt_generic/reconfig_form.py	Tue Jan 25 14:49:42 2005
@@ -2,19 +2,20 @@
 ##
 from Products.CMFCore.utils import getToolByName
 
+atool = getToolByName(script, 'portal_actions')
 ptool = getToolByName(script, 'portal_properties')
 
 
 form = context.REQUEST.form
 if change and \
         context.portal_config_control(**form) and \
-        context.setRedirect(ptool, 'global/configPortal'):
+        context.setRedirect(atool, 'global/configPortal'):
     return
 
 
 options = {}
 
-target = ptool.getActionInfo('global/configPortal')['url']
+target = atool.getActionInfo('global/configPortal')['url']
 buttons = []
 buttons.append( {'name': 'change', 'value': 'Change'} )
 options['form'] = { 'action': target,



More information about the CMF-checkins mailing list