[Checkins] SVN: plone.z3cform/trunk/plone/z3cform/layout.txt Also test passing 'label' to 'wrap_form'.

Daniel Nouri daniel.nouri at gmail.com
Thu Jul 24 09:58:50 EDT 2008


Log message for revision 88791:
  Also test passing 'label' to 'wrap_form'.
  

Changed:
  U   plone.z3cform/trunk/plone/z3cform/layout.txt

-=-
Modified: plone.z3cform/trunk/plone/z3cform/layout.txt
===================================================================
--- plone.z3cform/trunk/plone/z3cform/layout.txt	2008-07-24 13:50:14 UTC (rev 88790)
+++ plone.z3cform/trunk/plone/z3cform/layout.txt	2008-07-24 13:58:47 UTC (rev 88791)
@@ -77,6 +77,7 @@
     >>> f = os.fdopen(fd, 'w')
     >>> f.write("""
     ... <html>Hello, this is your layout speaking:
+    ... <h1 tal:content="view/label">View Title</h1>
     ... <div tal:content="structure view/contents"></div>
     ... </html>""")
     >>> f.close()
@@ -89,7 +90,7 @@
 ZCML, like with any other view.
     
     >>> from plone.z3cform.layout import wrap_form
-    >>> view_class = wrap_form(MyWrappedForm, index=layout)
+    >>> view_class = wrap_form(MyWrappedForm, index=layout, label=u"My label")
     >>> provideAdapter(adapts=(Interface, IBrowserRequest),
     ...                provides=Interface,
     ...                factory=view_class,
@@ -108,7 +109,7 @@
     >>> view = getMultiAdapter(
     ...     (context, request), name=u"test-form2").__of__(context)
     >>> print view() # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
-    <html>Hello, this is your layout speaking:...Age...</html>
+    <html>Hello, this is your layout speaking:...My label...Age...</html>
     >>> os.unlink(path)
     
 Send bad data to the form:



More information about the Checkins mailing list