X-Git-Url: https://scm.cri.minesparis.psl.eu/git/Plinn.git/blobdiff_plain/3c4367d8e03450e9a73e61f4247145d2b6c86a33..959d888c17d1403d2eeecc19bc4b5e2c8d1debf6:/skins/control/topic_edit_criteria_control.py?ds=sidebyside diff --git a/skins/control/topic_edit_criteria_control.py b/skins/control/topic_edit_criteria_control.py deleted file mode 100644 index d4ee1da..0000000 --- a/skins/control/topic_edit_criteria_control.py +++ /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