1 ##parameters=criteria, **kw
4 Save changes to the list of criteria. This is done by going over
5 the submitted criteria records and comparing them against the
6 criteria object's editable attributes. A 'command' object is
7 built to send to the Criterion objects 'apply' method, which in turn
8 applies the command to the Criterion objects 'edit' method.
12 crit
= context
.getCriterion(rec
.id)
14 for attr
in crit
.editableAttributes():
15 tmp
= getattr(rec
, attr
, None)
16 # Due to having multiple radio buttons on the same page
17 # with the same name but belonging to different records,
18 # they needed to be associated with different records with ids
20 tmp
= getattr(rec
, '%s__%s' % (attr
, rec
.id), None)
24 if kw
.has_key('acquireCriteria') :
25 context
.edit(kw
['acquireCriteria'])
27 return context
.setStatus(True, "Changes saved.")