{include file="AdminHeader.htm"}
<!-- Created by www.phpgen.com on {{$Page.CreatedTime}}. -->
<body>
  {if $Saved}
  <table align="center" class="tblwide noborder">
  <caption>Record {$ItemID} has been updated. Choose next step...</caption>
  <tr>
    <td>
      <ul>
        <li><a href="View.php?{{$Page.RequestParam}}">View the record again.</a></li>
        <li><a href="Edit.php?{{$Page.RequestParam}}">Edit the record again.</a></li>
        <li><a href="List.php">Return to the list page.</a></li>
      </ul>
    </td>
  </tr>
  </table>
  {else}
  <form name="Edit{{$Page.TableName}}" method="post" enctype="multipart/form-data">
    <table align="center" class="noborder">
      <caption>{$PageTitle}</caption>
      {{if $Page.Fields.Required}}

      <!-- Fields must be filled-->
      <tr class="colhead">
        <th colspan="2">{$Lang.MustFill}</th>
      </tr>
      {{foreach from=$Page.Fields.Required key=FieldName item=Field}}<tr>
        <th>{$Lang.{{$FieldName}}}</th>
        <td>
          {{$Field.InputHtml}}
          {if $CFG.DataType.{{$Field.DataRule}}.Desc}<sup class="red"> ( {$CFG.DataType.{{$Field.DataRule}}.Desc})</sup>{/if}
          {$Lang.Note.{{$FieldName}}}
        </td>
      </tr>
      {{/foreach}}
      {{/if}}
      {{if $Page.Fields.Optional}}

      <!-- Fields optional-->
      <tr class="colhead">
        <th colspan="2">{$Lang.Optional}</th>
      </tr>
      {{foreach from=$Page.Fields.Optional key=FieldName item=Field}}<tr>
        <th>{$Lang.{{$FieldName}}}</th>
        <td>
          <input type="text" name="{{$FieldName}}" value="" />
          {if $CFG.DataType.{{$Field.DataRule}}.Desc}<sup class="red"> ( {$CFG.DataType.{{$Field.DataRule}}.Desc})</sup>{/if}
          {$Lang.Note.{{$FieldName}}}
        </td>
      </tr>
      {{/foreach}}
      {{/if}}

      <tr>
        <td colspan="2" align="center">
          <input type="submit" name="Submit" value="{$Lang.Save}(S)"  accesskey="s" class="submit" />
          <input type="reset"  name="Reset"  value="{$Lang.Reset}(R)" accesskey="R" class="button" />
          {{foreach from=$Page.IdField item=FieldName}}
          {{$CFG.GEN.EmptyLine}}
          <input type="hidden" name="{{$FieldName}}" value="{${{$FieldName}}}" class="submit" />
          {{/foreach}}
          {{$CFG.GEN.EmptyLine}}
        </td>
      </tr>
    </table>
  </form>
  {/if}
</body>
</html>