Author: jmorliaguet
Date: Wed Jun 28 23:03:31 2006
New Revision: 3555

Modified:
   cpsskins/branches/paris-sprint-2006/locations/interfaces.py
   cpsskins/branches/paris-sprint-2006/setup/io/adapters.py
   cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py

Log:

- made the location root a field otherwise it won't get exported
  omit it in the forms



Modified: cpsskins/branches/paris-sprint-2006/locations/interfaces.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/locations/interfaces.py (original)
+++ cpsskins/branches/paris-sprint-2006/locations/interfaces.py Wed Jun 28 
23:03:31 2006
@@ -33,7 +33,9 @@
 
     _method = Attribute("Path's method name.")
 
-    root = Attribute("Location root")
+    root = TextLine(
+        title=u"Root",
+        )
 
     path = TextLine(
         title=u"Path",

Modified: cpsskins/branches/paris-sprint-2006/setup/io/adapters.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/io/adapters.py    (original)
+++ cpsskins/branches/paris-sprint-2006/setup/io/adapters.py    Wed Jun 28 
23:03:31 2006
@@ -201,7 +201,8 @@
                     field = fields[field_name]
                     field_io = IFieldIO(field, None)
                     if field_io is None:
-                        raise TypeError("No field adapter found for '%s'." % 
field)
+                        raise TypeError("No field adapter found for '%s'." % \
+                                        field)
                     value = field_io.load(text)
                     if IBinaryFieldIO.providedBy(field_io):
                         filename = value

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py 
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py Wed Jun 
28 23:03:31 2006
@@ -191,14 +191,12 @@
         return json.write({'form': {'section': root}})
 
 class LocationForm(object):
-    form_fields = form.Fields(ILocation, omit_readonly=True,
-                              render_context=True)
+    form_fields = form.Fields(ILocation, render_context=True).omit(u'root')
     prefix = u'form'
 
     def __init__(self, context, request):
         self.context = context
         self.request = request
-
         self.widgets = form.setUpWidgets(self.form_fields, self.prefix,
                                          context, request)
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to