[Checkins]
SVN: z3c.multiform/Sandbox/src/z3c/multiform/container/views.py
set label of cancel action to zope standard
"container_cancel_button"
Stefan Martin
s.martin at iwm-kmrc.de
Mon Apr 23 03:43:34 EDT 2007
Log message for revision 74651:
set label of cancel action to zope standard "container_cancel_button"
Changed:
U z3c.multiform/Sandbox/src/z3c/multiform/container/views.py
-=-
Modified: z3c.multiform/Sandbox/src/z3c/multiform/container/views.py
===================================================================
--- z3c.multiform/Sandbox/src/z3c/multiform/container/views.py 2007-04-23 06:32:55 UTC (rev 74650)
+++ z3c.multiform/Sandbox/src/z3c/multiform/container/views.py 2007-04-23 07:43:33 UTC (rev 74651)
@@ -120,7 +120,7 @@
def condition_cancel_action(form, action):
return multiform.anySubFormInputMode(form, action)
-label_cancel_action = _('Cancel')
+label_cancel_action = _("container_cancel_button")
class ContainerActions(object):
@@ -312,8 +312,10 @@
def __call__(self):
content = super(NameTextWidget, self).__call__()
# bad!
- context = self.context.context.context
- # zmi icon
+ try:
+ context = self.context.context.context
+ except:
+ context = self.context.context.__parent__ # zmi icon
zmi_icon = component.queryMultiAdapter((context, self.request), name='zmi_icon')
if zmi_icon is not None:
icon = u'<img class="itemicon" src="%s" /> ' % zmi_icon.url()
@@ -327,7 +329,10 @@
def __call__(self):
content = super(NameDisplayWidget, self).__call__()
# bad!
- context = self.context.context.context
+ try:
+ context = self.context.context.context
+ except:
+ context = self.context.context.__parent__
# zmi icon
zmi_icon = component.queryMultiAdapter((context, self.request), name='zmi_icon')
if zmi_icon is not None:
More information about the Checkins
mailing list