[CMF-checkins] CVS: CMF/CMFDefault/skins/content - folder_edit.py:1.3
Tres Seaver
tseaver@zope.com
Sat, 6 Oct 2001 20:29:56 -0400
Update of /cvs-repository/CMF/CMFDefault/skins/content
In directory cvs.zope.org:/tmp/cvs-serv11300/CMFDefault/skins/content
Modified Files:
folder_edit.py
Log Message:
- Added "Change and View" submit button to content / folder editing
forms; added check for this button to POST handlers in CMFDefault,
and indirected redirect targets in those methods through
'getActionByID'.
=== CMF/CMFDefault/skins/content/folder_edit.py 1.2 => 1.3 ===
-##parameters=title, description
+##parameters=title, description, choice=' Change '
##title=Edit a folder
context.edit( title=title,
description=description)
-qst='?portal_status_message=Folder+changed.'
-
-context.REQUEST.RESPONSE.redirect( context.absolute_url()
- + '/folder_contents' + qst )
+qst='portal_status_message=Folder+changed.'
+
+if choice == ' Change and View ':
+ target_action = context.getTypeInfo().getActionById( 'view' )
+else:
+ target_action = context.getTypeInfo().getActionById( 'edit' )
+
+context.REQUEST.RESPONSE.redirect( '%s/%s?%s' % ( context.absolute_url()
+ , target_action
+ , qst
+ ) )