<dtml-var manage_page_header>
<dtml-var manage_tabs>

<p class="form-help">
Edit <dtml-var meta_type> method TALES expressions here.
<dtml-if "not isTALESAvailable()"><br>
<span style="color: #FF0000;">
Zope Page Templates and therefore TALES is not installed.
This tab can therefore not be used.
</span>
</dtml-if>
</p>


<form action="manage_tales" method="POST">
<table cellspacing="0" cellpadding="2" border="0">


  <dtml-in "override_form.get_groups()">
  <dtml-let group=sequence-item fields="tales_form.get_fields_in_group(group)">

  <dtml-if fields>
  <tr>
  <td colspan="3" class="form-title">
    Proxy Widget properties
  </td>
  </tr>

  <dtml-var fieldListHeader>

  <dtml-let current_field="this()">
  <dtml-in fields>
  <dtml-let field=sequence-item field_id="field.id"
            value="current_field.get_tales(field.id)">
    <tr>
      <td align="left" valign="top">
      <div class="form-label">
      <dtml-var "field.title()">
      </div>
      </td>
      <td align="left" valign="top">
      <dtml-var "field.render(value)">
      </td>
      <td><div class="form-element">
      <dtml-var "current_field.form.get_field(field.id).meta_type">
      </div></td>
    </tr>
  </dtml-let>
  </dtml-in>
  </dtml-let>
  </dtml-if>
  </dtml-let>
  </dtml-in>




<!-- XXX Loop until find not a proxy field -->
<dtml-let proxy_field="this()"
          current_field="proxy_field.getRecursiveTemplateField()">

  <dtml-if "current_field is not None">
    <dtml-let form="current_field.tales_form">

  <dtml-in "form.get_groups()">
    <dtml-let group=sequence-item fields="form.get_fields_in_group(group)">
      <dtml-if fields>
        <tr>
          <td colspan="3" class="form-title">
            <dtml-var "_.string.capitalize(group)"> properties
          </td>
        </tr>

        <dtml-var proxyFieldListHeader>

        <dtml-in fields>


          <dtml-let field=sequence-item field_id="field.id"
                    value="proxy_field.get_recursive_tales(field_id)">
            <tr>
              <td align="left" valign="top">
                <dtml-let checkbox_key="'surcharge_%s' % field_id" >
                  <dtml-if "proxy_field.is_delegated(field_id)">
                    <input type="checkbox" 
                           name="<dtml-var checkbox_key>" 
                           checked="checked" />
                  <dtml-else >
                    <input type="checkbox" 
                           name="<dtml-var checkbox_key>" />
                  </dtml-if >
                </dtml-let >
              </td>



              <td align="left" valign="top">
              <div class="form-label">
              <dtml-var "field.title()">
              </div>
              </td>
              <td align="left" valign="top">
              <dtml-var "field.render(value)">
              </td>
              <td><div class="form-element">
              <dtml-var "current_field.form.get_field(field.id).meta_type">
              </div></td>
            </tr>
          </dtml-let>

        </dtml-in>

      </dtml-if>
    </dtml-let>
  </dtml-in>

  </dtml-let>
  </dtml-if>
  </dtml-let>

  <tr>
    <td align="left" valign="top">
    <div class="form-element">
    <input class="form-element" type="submit" name="submit" 
     value="Save Changes" /> 
    </div>
    </td>
  </tr>


</table>
</form>



<dtml-var manage_page_footer>



