[Erp5-report] r15545 - /erp5/trunk/products/ERP5Form/ListBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Aug 8 10:09:30 CEST 2007


Author: yusei
Date: Wed Aug  8 10:09:30 2007
New Revision: 15545

URL: http://svn.erp5.org?rev=15545&view=rev
Log:
sorry, my previous changes has a problem. I revert my changes.

Modified:
    erp5/trunk/products/ERP5Form/ListBox.py

Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=15545&r1=15544&r2=15545&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Wed Aug  8 10:09:30 2007
@@ -2997,41 +2997,9 @@
             LOG("ListBox FormValidationError",0,str(error_result))
             LOG("ListBox FormValidationError",0,str(errors))
             raise FormValidationError(errors, error_result)
-
-        return ListBoxEditor(field, result)
+        return result
 
 ListBoxValidatorInstance = ListBoxValidator()
-
-class ListBoxEditor:
-  """
-  A class holding all values required to update objects
-  """
-
-  def __init__(self, field, update_dict):
-    self.field = field
-    self.update_dict = update_dict
-
-  def view(self):
-    return self.__dict__
-
-  def __call__(self, REQUEST):
-    pass
-
-  def edit(self, context):
-    if self.update_dict is not None:
-      gv = {}
-      if self.field.has_value('global_attributes'):
-        hidden_attributes = map(lambda x:x[0], self.field.get_value('global_attributes'))
-        for k in hidden_attributes:
-          gv[k] = getattr(request, k, None)
-      for url, v in self.update_dict.items():
-        v.update(gv)
-        ## XXX security check is needed.
-        ## XXX we need to make restricted version of edit method.
-        self.field.restrictedTraverse(url).edit(**v)
-
-allow_class(ListBoxEditor)
-
 
 class ListBox(ZMIField):
   meta_type = "ListBox"




More information about the Erp5-report mailing list