summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 186c0cd)
raw | patch | inline | side by side (parent: 186c0cd)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 11 Dec 2002 01:46:46 +0000 (01:46 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 11 Dec 2002 01:46:46 +0000 (01:46 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1402 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
doc/customizing.txt | patch | blob | history | |
roundup/cgi/client.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index e29f68da06f94111bd716257bcf14fd6d02f423c..9cb3c5b8e1c2bfb55adf9c9426587abb39d312e9 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- allow StringHTMLProperty in MultilinkHTMLProperty test to work
- don't set explicit None Link properties in web create
- fixed nasty sorting bug that was lowercasing properties
+- allow multiple :remove and :add elements per property being edited
2002-11-07 0.5.2
diff --git a/doc/customizing.txt b/doc/customizing.txt
index 068e9076244f7e1096625e299bebd443f584b10c..21f9e69f840d83b81c2d5744087eb88b31db696a 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
Customising Roundup
===================
-:Version: $Revision: 1.64 $
+:Version: $Revision: 1.65 $
.. This document borrows from the ZopeBook section on ZPT. The original is at:
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
the :note if it's supplied.
:required=property,property,...
The named properties are required to be filled in the form.
+ :remove:<propname>=id(s)
+ The ids will be removed from the multilink property. You may have multiple
+ :remove:<propname> form elements for a single <propname>.
+ :add:<propname>=id(s)
+ The ids will be added to the multilink property. You may have multiple
+ :add:<propname> form elements for a single <propname>.
**new**
Add a new item to the database. You may use the same special form elements
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 0c8deac2f835e7f27038d5466eb401819fa8c914..e338d7a389814ffcd6d6a87a31c2a4b4724b797c 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.61 2002-12-10 23:39:40 richard Exp $
+# $Id: client.py,v 1.62 2002-12-11 01:46:46 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
props = {}
keys = form.keys()
properties = cl.getprops()
+ existing_cache = {}
for key in keys:
# see if we're performing a special multilink action
mlaction = 'set'
value = l
else:
# we're modifying the list - get the current list of ids
- try:
- existing = cl.get(nodeid, propname)
- except KeyError:
- existing = []
+ if props.has_key(propname):
+ existing = props[propname]
+ else:
+ existing = cl.get(nodeid, propname, [])
+
+ # now either remove or add
if mlaction == 'remove':
# remove - handle situation where the id isn't in the list
for entry in l: