[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container -
adding.py:1.26
Raju Sivalingam
sraju at zeomega.com
Wed Dec 10 02:41:10 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/container
In directory cvs.zope.org:/tmp/cvs-serv10542
Modified Files:
adding.py
Log Message:
-- pick name if user doesn't pick one
=== Zope3/src/zope/app/browser/container/adding.py 1.25 => 1.26 ===
--- Zope3/src/zope/app/browser/container/adding.py:1.25 Tue Dec 9 05:45:48 2003
+++ Zope3/src/zope/app/browser/container/adding.py Wed Dec 10 02:41:09 2003
@@ -44,6 +44,7 @@
from zope.app.container.constraints import checkFactory
+
class BasicAdding(BrowserView):
implements(IAdding, IPublishTraverse)
@@ -71,6 +72,9 @@
else:
request = self.request
name = request.get('add_input_name',name)
+
+ if not name:
+ name = chooser.chooseName(self.contentName or '', content)
chooser.checkName(name, container)
container[name] = content
@@ -92,7 +96,6 @@
def renderAddButton(self):
"""To Render Add button with or without Inputbox"""
container = self.context
-
if IContainerNamesContainer.isImplementedBy(container):
return "<input type='submit' name='UPDATE_SUBMIT' value=' Add '>"
else:
More information about the Zope3-Checkins
mailing list