[Checkins] SVN: megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/ Forgot these modules

Christian Klinger cklinger at novareto.de
Wed Jun 24 11:47:30 EDT 2009


Log message for revision 101268:
  Forgot these modules

Changed:
  U   megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/directives.py
  U   megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/meta.py

-=-
Modified: megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/directives.py
===================================================================
--- megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/directives.py	2009-06-24 15:25:05 UTC (rev 101267)
+++ megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/directives.py	2009-06-24 15:47:30 UTC (rev 101268)
@@ -1,5 +1,6 @@
 import martian
 from martian import validateInterfaceOrClass
+from z3c.form import interfaces
 
 class field(martian.Directive):
     scope = martian.CLASS
@@ -10,7 +11,7 @@
 class mode(martian.Directive):
     scope = martian.CLASS
     store = martian.ONCE
-    default = None
+    default = interfaces.INPUT_MODE 
     # validate = validateInterfaceOrClass
 
 class view(martian.Directive):
@@ -18,3 +19,8 @@
     store = martian.ONCE
     default = None
     # validate = validateInterfaceOrClass
+
+class widget(martian.Directive):
+    scope = martian.CLASS
+    store = martian.ONCE
+    default = None

Modified: megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/meta.py
===================================================================
--- megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/meta.py	2009-06-24 15:25:05 UTC (rev 101267)
+++ megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/meta.py	2009-06-24 15:47:30 UTC (rev 101268)
@@ -66,13 +66,14 @@
     martian.directive(directives.view)
     martian.directive(directives.field)
     martian.directive(directives.mode)
+    martian.directive(directives.widget)
 
     def grok(self, name, factory, module_info, **kw):
         factory.module_info = module_info
         return super(WidgetTemplateGrokker, self).grok(name, factory, module_info, **kw)
 
-    def execute(self, factory, config, context, layer, template, view, field, mode, **kw):
+    def execute(self, factory, config, context, layer, template, view, field, widget, mode, **kw):
         template_path = '/'.join(factory.module_info.path.split('/')[:-1])
 	template = "%s/%s" %(template_path, template)
-        widgetTemplateDirective(config, template, context, layer, view=view, field=field, mode=mode)  
+        widgetTemplateDirective(config, template, context, layer, view=view, field=field, widget=widget, mode=mode)  
         return True



More information about the Checkins mailing list