[Checkins] SVN: plone.z3cform/trunk/plone/z3cform/macros.pt Simplify this example macro a little bit more.

Daniel Nouri daniel.nouri at gmail.com
Tue Jul 22 14:00:30 EDT 2008


Log message for revision 88723:
  Simplify this example macro a little bit more.
  
  If you want a customized look and feel for your forms, you'll probably
  want to override this macro or use different templates altogether.
  Some simple examples of form templates can be found in z3c.form's test
  directory:
  
    http://svn.zope.org/z3c.form/trunk/src/z3c/form/tests/
  

Changed:
  U   plone.z3cform/trunk/plone/z3cform/macros.pt

-=-
Modified: plone.z3cform/trunk/plone/z3cform/macros.pt
===================================================================
--- plone.z3cform/trunk/plone/z3cform/macros.pt	2008-07-22 17:57:09 UTC (rev 88722)
+++ plone.z3cform/trunk/plone/z3cform/macros.pt	2008-07-22 18:00:29 UTC (rev 88723)
@@ -22,23 +22,14 @@
              tal:condition="view/status" tal:content="view/status">
 	</div>
 
-	<tal:comment condition="nothing">
-          <ul tal:define="errors view/widgets/errors"
-              tal:condition="errors">
-            <li tal:repeat="error errors">
-              <tal:block replace="error/widget/label"/>:
-              <tal:block replace="structure error/render" />
-            </li>
-          </ul>
-	</tal:comment>
 
-	<form class="rowlike" action="." method="post"
+	<form action="." method="post"
               tal:attributes="action request/getURL; enctype view/enctype">
 
           <metal:define define-macro="fields">
             
             <tal:widgets repeat="widget view/widgets/values">
-              <div class="row horizontal"
+              <div class="row"
                    tal:define="hidden python:widget.mode == 'hidden'"
                    tal:omit-tag="hidden">
 		
@@ -46,18 +37,17 @@
                   <div class="field"
                        tal:define="error widget/error"
                        tal:attributes="class python:'field' + (error and ' error' or '')">
-                    
-                    <label for="" class="horizontal"
+                    <label for=""
                            tal:attributes="for widget/id"
                            tal:condition="not:hidden">
                       <span i18n:translate=""
                             tal:content="widget/label">label</span>
                     </label>
                     
-                    <span class="fieldRequired horizontal" title="Required"
+                    <span class="fieldRequired" title="Required"
                           tal:condition="python:widget.required and not hidden"
                           i18n:translate="label_required"
-                          i18n:attributes="title title_required;">
+                          i18n:attributes="title">
                       (Required)
                     </span>
                     
@@ -73,7 +63,7 @@
                       Error
                     </div>
                     
-                    <div class="widget horizontal">
+                    <div class="widget">
                       <input type="text" tal:replace="structure widget/render" />
                     </div>  
                   </div>
@@ -85,7 +75,7 @@
           </metal:define>
 
           <metal:define define-macro="actions">
-            <div class="action horizontal" tal:repeat="action view/actions/values|nothing">
+            <div class="action" tal:repeat="action view/actions/values|nothing">
               <input type="submit" tal:replace="structure action/render" />
             </div>
           </metal:define>



More information about the Checkins mailing list