<!-- BEGIN {$smarty.template} -->

{if strlen($STATUSMSG)}<div class="msg">{$STATUSMSG}</div>{/if}

<form action="{$FORM_ACTION}" method="post" name="feditprod">
<input type="hidden" name="prod_id" value="{if isset($prodinfo.prod_id)}{$prodinfo.prod_id}{/if}">

<table class="stdtable" cellspacing="0">
  <caption><em>{if isset($prodinfo.prod_id)}{t}Edit product{/t}{else}{t}Add product{/t}{/if}</em></caption>
  <tr>
    <td class="label"> {t}Product code{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="prod_code" value="{$prodinfo.prod_code|wash}" size="18" maxlength="18">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Product name{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="prod_name" value="{$prodinfo.prod_name|wash}" size="50" maxlength="100">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Price{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="prod_price" value="{$prodinfo.prod_price|wash}" size="14" maxlength="14"></td>
  </tr>
  <tr>
    <td class="label"> {t}Daily consumption{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="prod_consumption" value="{$prodinfo.prod_consumption|wash}" size="14" maxlength="14"></td>
  </tr>
  <tr>
    <td class="label"> {t}Stock{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="prod_stock" value="{$prodinfo.prod_stock|wash}" size="12" maxlength="12">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Category{/t}: </td>
    <td class="data">
      <select name="prcat_id">
        {html_options options=$select_prcat selected=$prodinfo.prcat_id}
      </select>
    </td>
  </tr>
</table>

<div class="buttons">
  <input type="submit" name="submit" value="{t}Submit{/t}"> <input type="button" onclick="location.href='{if isset($prodinfo.prod_id)}product.php?id={$prodinfo.prod_id}{else}products.php{/if}';" value="{t}Cancel{/t}">
</div>

</form>

{literal}
<script type="text/javascript">
document.forms["feditprod"].elements["prod_code"].focus();
</script>
{/literal}

<!-- END {$smarty.template} -->
