proxyFieldEdit.dtml 3.94 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
<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">

  <!-- 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
  </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-let proxy_field="this()"
          current_field="proxy_field.getRecursiveTemplateField()">
  
  <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>
105 106 107
            <td><div class="form-element">
            <dtml-var "field.get_value('description')">
            </div></td>
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
          </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>