add getMessage() method for standardized message handling in forms
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3379 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
1a47ac9182
commit
6def865e88
2 changed files with 4 additions and 1 deletions
|
@ -409,7 +409,7 @@ class IndexAttributes(object):
|
||||||
@Lazy
|
@Lazy
|
||||||
def adaptedIndexAttributes(self):
|
def adaptedIndexAttributes(self):
|
||||||
if self.adapted != self.context:
|
if self.adapted != self.context:
|
||||||
return component.queryAdapter(self.adapted, IIndexAttributes)
|
#return component.queryAdapter(self.adapted, IIndexAttributes)
|
||||||
return IIndexAttributes(self.adapted, None)
|
return IIndexAttributes(self.adapted, None)
|
||||||
|
|
||||||
def text(self):
|
def text(self):
|
||||||
|
|
|
@ -121,6 +121,9 @@ class BaseView(object):
|
||||||
for p in packages:
|
for p in packages:
|
||||||
requirements.add(p)
|
requirements.add(p)
|
||||||
|
|
||||||
|
def getMessage(self, id):
|
||||||
|
return self.request.form.get('loops.messages').get(id, {})
|
||||||
|
|
||||||
def renderText(self, text, contentType):
|
def renderText(self, text, contentType):
|
||||||
typeKey = util.renderingFactories.get(contentType, None)
|
typeKey = util.renderingFactories.get(contentType, None)
|
||||||
if typeKey is None:
|
if typeKey is None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue