Changeset 2807 in products


Ignore:
Timestamp:
Sep 13, 2010 4:02:42 PM (14 years ago)
Author:
mylan
Message:

#195: Updated example form to clarify doctests

Location:
quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/example.pt

    r2804 r2807  
    99<div metal:fill-slot="prefs_configlet_main"> 
    1010 
    11             <form action="." 
    12                   tal:attributes="action request/URL;" 
    13                   method="post" 
    14                   enctype="multipart/form-data"> 
     11    <form action="." 
     12          tal:attributes="action request/URL;" 
     13          method="post" 
     14          enctype="multipart/form-data"> 
    1515 
    16                     <tal:block tal:repeat="widget view/widgets"> 
     16            <tal:block tal:repeat="widget view/widgets"> 
    1717 
    18                         <div class="field" 
    19                              tal:define="description widget/hint; 
    20                                          error widget/error"> 
    21                            
    22                             <label tal:attributes="for widget/name" 
    23                                    tal:content="widget/label"> 
    24                                 label 
    25                             </label> 
     18                <div class="field" 
     19                     tal:define="description widget/hint; 
     20                                 error widget/error"> 
    2621 
    27                             <div class="widget" tal:content="structure widget"> 
    28                                 <input type="text" /> 
    29                             </div> 
    30                         </div> 
     22                    <label tal:attributes="for widget/name" 
     23                           tal:content="widget/label"> 
     24                        label 
     25                    </label> 
    3126 
    32                     </tal:block> 
     27                    <div class="fieldErrorBox" tal:content="structure error"> 
     28                      The Error 
     29                    </div> 
    3330 
    34                 <div class="visualClear"><!-- --></div> 
     31                    <div class="widget" tal:content="structure widget"> 
     32                        <input type="text" /> 
     33                    </div> 
     34                </div> 
    3535 
    36                 <div id="actionsView" class="formControls"> 
    37                     <span class="actionButtons" 
    38                           tal:condition="view/availableActions"> 
    39                         <input tal:repeat="action view/actions" 
    40                                tal:replace="structure action/render" /> 
    41                     </span> 
    42                 </div> 
     36            </tal:block> 
    4337 
    44             </form> 
     38        <div class="visualClear"><!-- --></div> 
    4539 
    46     </div> 
     40        <div id="actionsView" class="formControls"> 
     41            <span class="actionButtons" 
     42                  tal:condition="view/availableActions"> 
     43                <input tal:repeat="action view/actions" 
     44                       tal:replace="structure action/render" /> 
     45            </span> 
     46        </div> 
     47 
     48    </form> 
     49 
     50</div> 
    4751 
    4852</body> 
  • quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/example.py

    r2804 r2807  
    1111 
    1212class ICaptchaFormlibFormSchema(Interface): 
    13     label = TextLine(title=u'Label') 
     13    label = TextLine(title=u'Label', 
     14                     required=False) 
    1415    captcha = Captcha(title=u'Type the code') 
    1516       
Note: See TracChangeset for help on using the changeset viewer.