{include file="Header.htm"}
<body>
<h3>Build edit page of table {$Table.Label}</h3>
{if $Codes}
  <ul>
    <li><a href="{$CFG.BaseURL}{$DemoURL}" target="_blank">Preview the result</a></li>
    <li><a href="ManageAdminEdit.php?Showing=true">Edit the page again</a></li>
  </ul>
{$Codes.PHP}
{$Codes.HTML}
{else}
<ul>
  <li><a href="#" onclick="switchDisplay('ManagePage');">Setting the page.</a></li>
  {if $PageCFG}{include file='Page/ViewAndDownLink.htm'}{/if}
</ul>
<form name="ManagePage" method="post" {if $Showing}style="display:none"{/if}>
  <table align="center" class="tblfull">
    <caption>Manage Admin Add Page of {$Table.Label}</caption>
    <tr class="colhead">
      <th>FieldName</th>
      <th>FieldType</th>
      <th>Input Type</th>
      <th>Input Params</th>
      <th>Fill</th>
      <th>DataRule</th>
    </tr>
    {foreach from=$Page.Fields key=FieldName item=Field}
    <tr>
      <th>{$Field.Label}</th>
      <td>{$Table.Fields.$FieldName.Type}</td>
      <td>{$InputTypeList.$FieldName}</td>
      <td><input type="text" name="InputParam[{$FieldName}]" value="{$Field.InputParam}" /></td>
      <td align="center">
        <input type="radio" name="Fill[{$FieldName}]" value="Required"  {if $Field.Fill=="Required"} checked="checked" {/if} title="Required" class="radio" />
        <input type="radio" name="Fill[{$FieldName}]" value="Optional"  {if $Field.Fill=="Optional"} checked="checked" {/if} title="Optional" class="radio" />
        <input type="radio" name="Fill[{$FieldName}]" value="Excluded"  {if $Field.Fill=="Excluded"} checked="checked" {/if} title="Excluded" class="radio" />
      </td>
      <td>{$DataRuleList.$FieldName}</td>
    </tr>
    {/foreach}
    <tr>
      <td colspan="5" align="center">
        <input type="submit" name="Submit" value="Save" class="submit" />
      </td>
    </tr>
 </table>
</form>
{/if}
</body>
</html>