Commit 69f6f129 authored by Casey Duncan's avatar Casey Duncan

Fixed PropertyManager/PropertySheets so that you can add a property named

'ids' without the sky falling.
parent 3933e8af
......@@ -55,6 +55,9 @@ Zope Changes
the default level for <Hx> elements (see doc/ENVIRONMENT.txt)
Bugs:
- Fixed PropertyManager/PropertySheets so that you can safely add a
property named 'ids' without breaking your properties page.
- Removed spurious 'self' from scarecrow interfaces; updated
method-generation in Interface package to ignore self when
......
......@@ -12,7 +12,7 @@
##############################################################################
"""Property management"""
__version__='$Revision: 1.43 $'[11:-2]
__version__='$Revision: 1.44 $'[11:-2]
import ExtensionClass, Globals
import ZDOM
......@@ -310,6 +310,10 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
def manage_delProperties(self, ids=None, REQUEST=None):
"""Delete one or more properties specified by 'ids'."""
if REQUEST:
# Bugfix for property named "ids" (Casey)
if ids == self.getProperty('ids', None): ids = None
ids = REQUEST.get('_ids', ids)
if ids is None:
return MessageDialog(
title='No property specified',
......
......@@ -12,7 +12,7 @@
##############################################################################
"""Property sheets"""
__version__='$Revision: 1.82 $'[11:-2]
__version__='$Revision: 1.83 $'[11:-2]
import time, App.Management, Globals
from webdav.WriteLockInterface import WriteLockInterface
......@@ -421,6 +421,10 @@ class PropertySheet(Traversable, Persistent, Implicit):
def manage_delProperties(self, ids=None, REQUEST=None):
"""Delete one or more properties specified by 'ids'."""
if REQUEST:
# Bugfix for properties named "ids" (casey)
if ids == self.getProperty('ids', None): ids = None
ids = REQUEST.get('_ids', ids)
if ids is None:
return MessageDialog(
title='No property specified',
......
......@@ -42,7 +42,7 @@ property values, edit the values and click &quot;Save Changes&quot;.
<tr>
<td align="left" valign="top" width="16">
<dtml-if "'d' in _['sequence-item'].get('mode', 'awd')">
<input type="checkbox" name="ids:list" value="<dtml-var id html_quote>"
<input type="checkbox" name="_ids:list" value="<dtml-var id html_quote>"
id="cb-<dtml-var id>">
<dtml-else>
</dtml-if>
......
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