<dtml-var manage_page_header>
<dtml-let help_product="'Formulator'" help_topic=meta_type>
<dtml-var manage_tabs>
</dtml-let>

<p class="form-help">
Surcharge <dtml-var meta_type> properties here.
</p>

<form action="manage_edit" method="POST">
<table cellspacing="0" cellpadding="2" border="0">
<dtml-let proxy_field="this()"
          current_field="proxy_field.getRecursiveTemplateField()">

  <!-- First, display ProxyField properties -->
  <!-- see: Formulator/dtml/fieldEdit.dtml -->
  <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">
    Proxy Widget properties <dtml-if "current_field is not None">(<dtml-var expr="current_field.meta_type">)</dtml-if>
  </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_orig_value(field_id)"
            override="current_field.get_override(field_id)"
            tales="current_field.get_tales(field_id)">
    <tr>
      <td align="left" valign="top">
      <div class="form-label">
      <dtml-if "tales or override">[</dtml-if><dtml-var "field.title()"><dtml-if "field.has_value('required') and field.get_value('required')">*</dtml-if><dtml-if "tales or override">]</dtml-if>
      </div>
      </td>
      <td align="left" valign="top">
      <dtml-var "field.render(value)">
      </td>
      <td><div class="form-element">
      <dtml-var "field.meta_type">
      </div></td>
    </tr>
  </dtml-let>
  </dtml-in>
  </dtml-let>
  </dtml-if>
  </dtml-let>
  </dtml-in>


<!-- Then, display Template Field properties -->
  
  <dtml-if "current_field is not None">
    <dtml-let form="current_field.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_orig_value(field_id)"
                  override="proxy_field.get_recursive_override(field_id)"
                  tales="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-if "tales or override">[
                </dtml-if>
                <dtml-var "field.title()">
                <dtml-if "field.has_value('required') and field.get_value('required')">*
                </dtml-if>
                <dtml-if "tales or override">]
              </dtml-if>
            </div>
            </td>
            <td align="left" valign="top">
            <dtml-var "field.render(value)">
            </td>
            <td><div class="form-element">
            <dtml-var "field.meta_type">
            </div></td>
            <td><div class="form-element">
            <dtml-var "field.get_value('description')">
            </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>
