Commit 438d4272 authored by Jim Fulton's avatar Jim Fulton

Changed the "add and edit" redirect to quote the id. This is needed

to support class instance method editing hijinks.
parent ca4fb887
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Document objects.""" """DTML Document objects."""
__version__='$Revision: 1.13 $'[11:-2] __version__='$Revision: 1.14 $'[11:-2]
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
...@@ -92,6 +92,7 @@ from DTMLMethod import DTMLMethod, decapitate ...@@ -92,6 +92,7 @@ from DTMLMethod import DTMLMethod, decapitate
from PropertyManager import PropertyManager from PropertyManager import PropertyManager
from sgmllib import SGMLParser from sgmllib import SGMLParser
from string import find from string import find
from urllib import quote
done='done' done='done'
...@@ -211,10 +212,10 @@ def add(self, id, title='', file='', REQUEST=None, submit=None): ...@@ -211,10 +212,10 @@ def add(self, id, title='', file='', REQUEST=None, submit=None):
if not file: file=default_dd_html if not file: file=default_dd_html
ob=DTMLDocument(file, __name__=id) ob=DTMLDocument(file, __name__=id)
ob.title=title ob.title=title
self._setObject(id, ob) id=self._setObject(id, ob)
if REQUEST is not None: if REQUEST is not None:
u=REQUEST['URL1'] u=REQUEST['URL1']
if submit==" Add and Edit ": u="%s/%s" % (u,id) if submit==" Add and Edit ": u="%s/%s" % (u,quote(id))
REQUEST.RESPONSE.redirect(u+'/manage_main') REQUEST.RESPONSE.redirect(u+'/manage_main')
return '' return ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment