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

{if !isset($from_project)}
{if strlen($STATUSMSG)}<p>{$STATUSMSG}</p>{/if}

<form action="{$FORM_ACTION}" method="post" name="feditcpn">
<input type="hidden" name="cpn_id" value="{$cpnInfo.cpn_id}">
{/if}
<table class="stdtable" cellspacing="0">
  <tr>
    <td class="header" colspan="2"> {if isset($cpnInfo.cpn_id)}{t}Edit company{/t}{else}{t}Add company{/t}{/if} </td>
  </tr>
  <tr>
    <td class="label req"> {t}Customer{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="cpn_name" id="cpn_name" value="{$cpnInfo.cpn_name|wash}" size="50" maxlength="100"></td>
  </tr>
  <tr>
    <td class="label"> {t}Address{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="cpn_address" value="{$cpnInfo.cpn_address|wash}" size="50" maxlength="250"></td>
  </tr>
  <tr>
    <td class="label"> {t}Address 2{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="cpn_address2" value="{$cpnInfo.cpn_address2|wash}" size="50" maxlength="250"></td>
  </tr>
  <tr>
    <td class="label"> {t}ZIP{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="cpn_zip" value="{$cpnInfo.cpn_zip|wash}" size="10" maxlength="30">
      <span class="label">{t}City{/t}:</span>
      <input type="text" class="tinput" name="cpn_city" value="{$cpnInfo.cpn_city|wash}" size="30" maxlength="100">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Region{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="cpn_region" value="{$cpnInfo.cpn_region|wash}" size="10" maxlength="40">
      <span class="label">{t}Country{/t}:</span>
      <select name="ctr_id">
        {html_options options=$select_ctr selected=$cpnInfo.ctr_id}
      </select>
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Category{/t}: </td>
    <td class="data">
      <select name="ccat_id">
        {html_options options=$select_ccat selected=$cpnInfo.ccat_id}
      </select>
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Tax number{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="cpn_taxnr" value="{$cpnInfo.cpn_taxnr|wash}" size="15" maxlength="30"></td>
  </tr>
  <tr>
    <td class="label"> {t}Default term of payment{/t}: </td>
    <td class="data"> <input type="text" class="tinput" name="cpn_defaultpayterm" value="{$cpnInfo.cpn_defaultpayterm|wash}" size="30" maxlength="30"> </td>
  </tr>
  <tr>
    <td class="label"> {t}Phone{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="cpn_phone" value="{$cpnInfo.cpn_phone|wash}" size="15" maxlength="30">
      <span class="label">{t}Fax{/t}:</span>
      <input type="text" class="tinput" name="cpn_fax" value="{$cpnInfo.cpn_fax|wash}" size="15" maxlength="30">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Url{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="cpn_url" value="{$cpnInfo.cpn_url|wash}" size="50" maxlength="200">
    </td>
  </tr>
  <tr{if !isset($from_project)} class="last"{/if}>
    <td class="label"> {t}Email{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="cpn_email" value="{$cpnInfo.cpn_email|wash}" size="50" maxlength="200">
    </td>
  </tr>
  {if !isset($from_project)}
  <tr>
    <td colspan="2" class="last"><input type="submit" name="submit" value="{t}Submit{/t}"> <input type="button" onclick="location.href='{if isset($cpnInfo.cpn_id)}company.php?id={$cpnInfo.cpn_id}{else}companies.php{/if}';" value="{t}Cancel{/t}"></td>
  </tr>
  {/if}
</table>
{if !isset($from_project)}
</form>
{/if}

{if !isset($from_project)}
{literal}
<script type="text/javascript">
document.getElementById("cpn_name").focus();
</script>
{/literal}
{/if}

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