[Erp5-report] r19910 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 14 15:36:11 CET 2008
Author: romain
Date: Fri Mar 14 15:36:11 2008
New Revision: 19910
URL: http://svn.erp5.org?rev=19910&view=rev
Log:
r19868 removed too much code, and PlanningBox editor wasn't call anymore
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml?rev=19910&r1=19909&r2=19910&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml Fri Mar 14 15:36:11 2008
@@ -103,7 +103,35 @@
MARKER = []\n
message = N_("Data+Updated.")\n
\n
+\n
+def parseField(f):\n
+ """\n
+ Parse given form field, to put them in\n
+ kw or in encapsulated_editor_list\n
+ """\n
+ k = f.id\n
+ v = getattr(request, k, MARKER)\n
+ if hasattr(v, \'edit\'):\n
+ # This is an encapsulated editor\n
+ # call it\n
+ encapsulated_editor_list.append(v)\n
+ elif v is not MARKER:\n
+ if k.startswith(field_prefix):\n
+ # We only take into account\n
+ # the object attributes\n
+ k = k[field_prefix_len:]\n
+ # Form: \'\' -> ERP5: None\n
+ if v == \'\':\n
+ v = None\n
+ kw[k] = v\n
+\n
try:\n
+ # We process all the field in form and\n
+ # we check if they are in the request,\n
+ # then we edit them\n
+ for field in form.get_fields():\n
+ parseField(field)\n
+\n
for encapsulated_editor in encapsulated_editor_list:\n
encapsulated_editor.edit(context)\n
except ActivityPendingError,e:\n
@@ -209,6 +237,8 @@
<string>encapsulated_editor_list</string>
<string>MARKER</string>
<string>message</string>
+ <string>parseField</string>
+ <string>field</string>
<string>encapsulated_editor</string>
<string>e</string>
<string>int</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=19910&r1=19909&r2=19910&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Fri Mar 14 15:36:11 2008
@@ -1,1 +1,1 @@
-740
+741
More information about the Erp5-report
mailing list