Commit a8467418 authored by Amos Latteier's avatar Amos Latteier

Changed document editing confirmation to use manage_tabs_message. Whew!

parent 37522a61
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Document objects.""" """DTML Document objects."""
__version__='$Revision: 1.20 $'[11:-2] __version__='$Revision: 1.21 $'[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
...@@ -148,10 +148,9 @@ class DTMLDocument(DTMLMethod, PropertyManager): ...@@ -148,10 +148,9 @@ class DTMLDocument(DTMLMethod, PropertyManager):
self.title=title self.title=title
if type(data) is not type(''): data=data.read() if type(data) is not type(''): data=data.read()
self.munge(data) self.munge(data)
if REQUEST: return MessageDialog( if REQUEST:
title ='Success!', message="Content changed."
message='Your changes have been saved', return self.manage_main(self,REQUEST,manage_tabs_message=message)
action ='manage_main')
def manage_upload(self,file='', REQUEST=None): def manage_upload(self,file='', REQUEST=None):
"""Replace the contents of the document with the text in file.""" """Replace the contents of the document with the text in file."""
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.16 $'[11:-2] __version__='$Revision: 1.17 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi,lower from string import join,split,strip,rfind,atoi,lower
...@@ -244,10 +244,9 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager, ...@@ -244,10 +244,9 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
self.title=title self.title=title
if type(data) is not type(''): data=data.read() if type(data) is not type(''): data=data.read()
self.munge(data) self.munge(data)
if REQUEST: return MessageDialog( if REQUEST:
title ='Success!', message="Content changed."
message='Your changes have been saved', return self.manage_main(self,REQUEST,manage_tabs_message=message)
action ='manage_main')
def manage_upload(self,file='', REQUEST=None): def manage_upload(self,file='', REQUEST=None):
"""Replace the contents of the document with the text in file.""" """Replace the contents of the document with the text in file."""
......
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