]> CRI, Mines Paris - PSL - Plinn.git/blobdiff - skins/control/topic_edit_criteria_control.py
Déplacement pour eggification.
[Plinn.git] / skins / control / topic_edit_criteria_control.py
diff --git a/skins/control/topic_edit_criteria_control.py b/skins/control/topic_edit_criteria_control.py
deleted file mode 100644 (file)
index d4ee1da..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-##parameters=criteria, **kw
-
-"""\
-Save changes to the list of criteria.  This is done by going over
-the submitted criteria records and comparing them against the
-criteria object's editable attributes. A 'command' object is
-built to send to the Criterion objects 'apply' method, which in turn
-applies the command to the Criterion objects 'edit' method.
-"""
-
-for rec in criteria:
-       crit = context.getCriterion(rec.id)
-       command = {}
-       for attr in crit.editableAttributes():
-               tmp = getattr(rec, attr, None)
-               # Due to having multiple radio buttons on the same page
-               # with the same name but belonging to different records,
-               # they needed to be associated with different records with ids
-               if tmp is None:
-                       tmp = getattr(rec, '%s__%s' % (attr, rec.id), None)
-               command[attr] = tmp
-       crit.apply(command)
-
-if kw.has_key('acquireCriteria') :
-       context.edit(kw['acquireCriteria'])
-
-return context.setStatus(True, "Changes saved.")
\ No newline at end of file