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

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

<form action="{$FORM_ACTION}" method="post" enctype="multipart/form-data" name="feditpers">
<input type="hidden" name="pe_id" value="{if isset($peInfo.pe_id)}{$peInfo.pe_id}{/if}">

<table class="stdtable" cellspacing="0">
  <tr>
    <td class="header" colspan="2"> {if isset($peInfo.pe_id)}{t}Edit person{/t}{else}{t}Add person{/t}{/if} </td>
  </tr>

  <tr>
    <td class="label"> {t}First name{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="pe_firstname" value="{$peInfo.pe_firstname|wash}" size="10" maxlength="50">
        {t}Last name{/t}:
      <input type="text" class="tinput" name="pe_lastname" value="{$peInfo.pe_lastname|wash}" size="30" maxlength="100">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Address{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="pe_address" value="{$peInfo.pe_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="pe_address2" value="{$peInfo.pe_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="pe_zip" value="{$peInfo.pe_zip|wash}" size="10" maxlength="30">
      <span class="label">{t}City{/t}:</span>
      <input type="text" class="tinput" name="pe_city" value="{$peInfo.pe_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="pe_region" value="{$peInfo.pe_region|wash}" size="10" maxlength="40">
      <span class="label">{t}Country{/t}:</span>
      <select name="ctr_id">
        {html_options options=$select_ctr selected=$peInfo.ctr_id}
      </select>
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Category{/t}: </td>
    <td class="data">
      <select name="pecat_id">
        {html_options options=$select_pecat selected=$peInfo.pecat_id}
      </select>
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Company{/t}: </td>
    <td class="data">
      <select name="cpn_id">
        {html_options options=$select_cpn selected=$peInfo.cpn_id}
      </select>
      <span class="label">{t}Job category{/t}:</span>
      <select name="jcat_id">
        {html_options options=$jobcategories selected=$peInfo.jcat_id}
      </select>
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Default hourly rate{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="pe_hourlyrate" value="{$peInfo.pe_hourlyrate|wash}" size="10" maxlength="16"></td>
  </tr>
  <tr>
    <td class="label"> {t}Tax number{/t}: </td>
    <td class="data"><input type="text" class="tinput" name="pe_taxnr" value="{$peInfo.pe_taxnr|wash}" size="15" maxlength="30"></td>
  </tr>
  <tr>
    <td class="label"> {t}Work phone{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="pe_phonework" value="{$peInfo.pe_phonework|wash}" size="15" maxlength="30">
      <span class="label">{t}Fax{/t}:</span>
      <input type="text" class="tinput" name="pe_fax" value="{$peInfo.pe_fax|wash}" size="15" maxlength="30">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Mobile{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="pe_phonemobile" value="{$peInfo.pe_phonemobile|wash}" size="15" maxlength="30">
      <span class="label">{t}Home phone{/t}:</span>
      <input type="text" class="tinput" name="pe_phonehome" value="{$peInfo.pe_phonehome|wash}" size="15" maxlength="30">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Url{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="pe_url" value="{$peInfo.pe_url|wash}" size="50" maxlength="200">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Email{/t}: </td>
    <td class="data">
      <input type="text" class="tinput" name="pe_email" value="{$peInfo.pe_email|wash}" size="50" maxlength="200">
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Note{/t}: </td>
    <td class="data">
      <textarea name="pe_note" cols="50" rows="3" wrap="virtual">{$peInfo.pe_note|stripslashes|wash}</textarea>
    </td>
  </tr>
  <tr>
    <td class="label"> {t}Picture{/t}: </td>
    <td class="data">
      {if strlen($peInfo.pe_fotoname)}<img src="image.php?image={$peInfo.pe_fotoname|urlencode}" border="1" alt="{$peInfo.pe_person|wash}" title="{$peInfo.pe_person|wash}" /> <br />{/if}

      {if (isset($peInfo.pe_id) && strlen($peInfo.pe_fotoname))}
      <input type="checkbox" name="del_foto" /> {t}Delete current picture{/t}<br />
      {if !$smarty.const.PHPAGA_UPLOADS_DISABLED}<p>{t}The current picture will be replaced if you upload a new picture.{/t}</p>{/if}
      {/if}

      {if !$smarty.const.PHPAGA_UPLOADS_DISABLED}
      <input type="file" name="pe_foto" class="tinput" size="60" />
      {else}
      <p>{t}Uploads are disabled.{/t}</p>
      {/if}
    </td>
  </tr>
  <tr>
    <td colspan="2"><input type="submit" name="submit" value="{t}Submit{/t}"> <input type="button" onclick="location.href='{if isset($peInfo.pe_id)}person.php?id={$peInfo.pe_id}{else}persons.php{/if}';" value="{t}Cancel{/t}"></td>
  </tr>
</table>

</form>

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

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