Ignore:
Timestamp:
11 Jun 2011, 04:59:02 (14 years ago)
Author:
Henrik Bettermann
Message:

Display field attribute 'description' which is called hint in widgets and forms.

Change layout of form status message.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/form_edit.pt

    r6339 r6341  
    1515    tal:define="status view/status"
    1616    tal:condition="status">
    17 
    18     <div i18n:translate="" tal:content="view/status">
     17    Form Status:
     18    <span i18n:translate="" tal:content="view/status">
    1919      Form status summary
    20     </div>
    21 
    22     <ul class="errors" tal:condition="view/errors">
    23       <li tal:repeat="error view/error_views">
    24          <span tal:replace="structure error">Error Type</span>
    25       </li>
    26     </ul>
     20    </span>
    2721  </div>
    2822
     
    3125      <tal:block repeat="widget view/widgets">
    3226        <tr>
    33           <td class="label" tal:define="hint widget/hint">
    34             <label tal:condition="python:hint"
    35                    tal:attributes="for widget/name">
    36               <span class="required" tal:condition="widget/required">*
    37               </span><span i18n:translate=""
    38                              tal:content="widget/label">label</span>:
    39             </label>
    40             <label tal:condition="python:not hint"
    41                    tal:attributes="for widget/name">
    42               <span class="required" tal:condition="widget/required">*
    43               </span><span i18n:translate=""
    44                              tal:content="widget/label">label</span>:
     27          <td class="label">
     28            <label tal:attributes="for widget/name">
     29              <span class="required" tal:condition="widget/required">*</span>
     30              <span i18n:translate="" tal:content="widget/label">label</span>:
    4531            </label>
    4632          </td>
    4733          <td class="field">
    48             <div class="widget" tal:content="structure widget">
     34            <span class="widget" tal:content="structure widget">
    4935              <input type="text" />
    50             </div>
    51             <div class="error" tal:condition="widget/error">
     36            </span>
     37            <tal:error tal:condition="widget/error">
    5238              <span tal:replace="structure widget/error">error</span>
    53             </div>
     39            </tal:error>
     40            <tal:hint tal:condition="widget/hint">
     41              <span class="hint" tal:content="structure widget/hint">hint</span>
     42            </tal:hint>
    5443          </td>
    5544        </tr>
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r6339 r6341  
    333333        required = False,
    334334        )
    335     email = schema.TextLine(
     335    email = schema.ASCIILine(
    336336        title = u'Email',
    337337        required = False,
    338338        )
    339     phone = schema.TextLine(
     339    phone = schema.Int(
    340340        title = u'Phone',
     341        description = u'Enter phone number with country code and without spaces.',
    341342        required = False,
    342343        )
     
    345346        #default = DEFAULT_PASSPORT_IMAGE_MALE,
    346347        defaultFactory = default_passport_image,
     348        description = u'Maximun file size is 20 kB.',
    347349        required = True,
    348350        max_size = 20480,
Note: See TracChangeset for help on using the changeset viewer.