All pastes #827584 Raw Edit

Mine

public text v1 · immutable
#827584 ·published 2007-12-21 21:30 UTC
rendered paste body
    <div metal:define-macro="updateAddressInfo">
      <fieldset>
        <!-- note the tal variable substitution with ${aname} -->
        <legend tal:content="string:${aname} Address Information"
                i18n:translate="legend_update_address_information">
        </legend>
        <table border=0>

          <tr><td>

<!--        Payee Address Line 1
 -->  
            <!-- error is a local var to this div, outside of this particular execution of this code it does not exist. if error is not nothing, we should use the 'field error' class -->
            <div class="field"
                 tal:define="error errors/${aname}_address1|nothing';"
                 tal:attributes="class python: test( error,
                                               'field error',
                                               'field')">
              <label tal:attributes="i18n:translate string:label_${aname}_address1"
                     title="First line of address.">Address Line #1</label>

              <span class="fieldRequired" title="Required">(Required)</span>
<!--
              <div class="formHelp"
                   tal:attributes="i18n:translate string:label_${aname}_address1_help">
                   First line of address.
              </div>
 -->
              <!-- if error is not nothing, then this div should be evaluated -->
              <div tal:condition="error">
                <tal:block i18n:translate=""
                     tal:content="error">Error
                </tal:block>
              </div>

              <!-- note how we leverage the ${aname} expansion to fetch ${aname}_address1 from the request -->
              <input type="text"
                     tal:attributes="tabindex tabindex/next;
                     name string:${aname}_address1;
                     value request/${aname}_address1|address1;"/>
            </div>

          </td></tr>
          <tr><td>