{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{assign var=jobid value="job_`$i`"}
{assign var=jobpref value="jobs[`$i`]"}
+{assign var=sector_text value="sector_text_"|cat:$i}
+{assign var=sector value="sector_"|cat:$i}
+{assign var=entreprise value="entreprise_"|cat:$i}
<div id="{$jobid}">
<input type="hidden" name="{$jobpref}[removed]" value="0" />
<input type="hidden" name="{$jobpref}[new]" value="{if $new}1{else}0{/if}" />
{include file="include/flags.radio.tpl" name="`$jobpref`[pub]" val=$job.pub}
</div>
Entreprise n°{$i+1} :
- <input type="text" {if $job.name_error}class="error"{/if} size="35" maxlength="100"
+ {if $job.tmp_name}{$job.tmp_name} <small>(en cours de validation)</small>{else}
+ <input type="text" class="enterprise_name {if $job.name_error}error{/if}" size="35" maxlength="100"
name="{$jobpref}[name]" value="{$job.name}" />
+ {/if}
<a href="javascript:removeJob('{$jobid}', '{$jobpref}')">
{icon name=cross title="Supprimer cet emploi"}
</a>
</th>
</tr>
- <tr>
- <td class="titre">Page Web</td>
+ {if !$job.tmp_name}
+ <tr class="{$entreprise}">
+ <td class="center" colspan="2">
+ <small>Si ton entreprise ne figure pas dans la liste,
+ <a href="javascript:addEntreprise({$i})">clique ici</a> et complète les informations la concernant.</small>
+ </td>
+ </tr>
+ {/if}
+ <tr class="{$entreprise}" style="display: none">
+ <td class="titre">Acronyme</td>
<td>
- <input type="text" size="35" maxlength="255" {if $job.web_error}class="error"{/if}
- name="{$jobpref}[web]" value="{$job.web}" />
+ <input type="text" size="35" maxlength="255" {if $job.acronym_error}class="error"{/if}
+ name="{$jobpref}[acronym]" value="{$job.acronym}" />
</td>
</tr>
- <tr>
+ <tr class="{$entreprise}" style="display: none">
+ <td class="titre">Page web</td>
+ <td>
+ <input type="text" size="35" maxlength="255" {if $job.hq_web_error}class="error"{/if}
+ name="{$jobpref}[hq_web]" value="{$job.hq_web}" />
+ </td>
+ </tr>
+ <tr class="{$entreprise}" style="display: none">
+ <td class="titre">Email de contact</td>
+ <td>
+ <input type="text" maxlength="60" {if $job.hq_email_error}class="error"{/if}
+ name="{$jobpref}[hq_email]" value="{$job.hq_email}" />
+ </td>
+ </tr>
+ <!--<tr class="{$entreprise}" style="display: none">
+ <td colspan="2">
+ <div style="float: left">
+ <div class="titre">Adresse du siège</div>
+ <div style="margin-top: 20px; clear: both">
+ {include file="geoloc/form.address.tpl" name="`$jobpref`[hq_adr]" id="`$jobid`_adr" adr=$job.hq_adr}
+ </div>
+ </div>
+ </td>
+ </tr>-->
+ <tr class="{$entreprise}" style="display: none">
+ <td class="titre">Téléphone</td>
+ <td>
+ <input type="text" maxlength="28" {if $job.hq_tel_error}class="error"{/if}
+ name="{$jobpref}[hq_tel]" value="{$job.hq_tel}" />
+ </td>
+ </tr>
+ <tr class="{$entreprise}" style="display: none">
+ <td class="titre">Fax</td>
+ <td>
+ <input type="text" maxlength="28" {if $job.hq_fax_error}class="error"{/if}
+ name="{$jobpref}[hq_fax]" value="{$job.hq_fax}" />
+ </td>
+ </tr>
+
+ <tr class="pair">
+ <td colspan="2" class="center" style="font-style: italic">Ta place dans l'entreprise</td>
+ </tr>
+ <tr class="pair {$sector_text}">
<td class="titre">Secteur d'activité</td>
<td>
+ <input type="text" class="sector_name {if $job.sector_error}error{/if}" size="35" maxlength="100"
+ name="{$jobpref}[sss_secteur_name]" value="{$job.sss_secteur_name}" />
+ <a href="javascript:displayAllSector({$i})">{icon name="table" title="Tous les secteurs"}</a>
+ </td>
+ </tr>
+ <tr class="pair {$sector}" style="display: none">
+ <td class="titre" rowspan="3">Secteur d'activité</td>
+ <td>
<select name="{$jobpref}[secteur]" onchange="updateJobSecteur({$i}, '{$jobid}', '{$jobpref}', ''); return true;">
<option value=""> </option>
- {iterate from=$secteurs item=secteur}
+ {foreach from=$secteurs item=secteur}
<option value="{$secteur.id}" {if $secteur.id eq $job.secteur}selected="selected"{/if}>
{$secteur.label}
</option>
- {/iterate}
+ {/foreach}
</select>
</td>
</tr>
- <tr>
- <td class="titre">Sous-secteur d'activité</td>
+ <tr class="pair {$sector}" style="display: none">
<td id="{$jobid}_ss_secteur">
<input type="hidden" name="{$jobpref}[ss_secteur]" value="{$job.ss_secteur|default:'-1'}" />
- </td>
+ </td>
</tr>
- <tr>
- <td class="titre">Poste occupé</td>
- <td>
- <input type="text" size="35" maxlength="120" {if $job.poste_error}class="error"{/if}
- name="{$jobpref}[poste]" value="{$job.poste}" />
+ <tr class="pair {$sector}" style="display: none">
+ <td id="{$jobid}_sss_secteur">
+ <input type="hidden" name="{$jobpref}[sss_secteur]" value="{$job.sss_secteur|default:'-1'}" />
</td>
</tr>
- <tr>
+ <tr class="pair">
<td class="titre">Fonction occupée</td>
<td>
<select name="{$jobpref}[fonction]">
<option value=""> </option>
{assign var=ingroup value=false}
- {iterate from=$fonctions item=fonct}
+ {foreach from=$fonctions item=fonct}
{if $fonct.title}
{if $ingroup}</optgroup>{/if}
<optgroup label="{$fonct.fonction_fr}">
<option value="{$fonct.id}" {if $fonct.id eq $job.fonction}selected="selected"{/if}>
{$fonct.fonction_fr}
</option>
- {/iterate}
+ {/foreach}
{if $ingroup}</optgroup>{/if}
</select>
</td>
</tr>
<tr class="pair">
- <td colspan="2">
- <span class="titre">E-mail professionnel :</span>
- <input type="text" size="30" maxlength="60" {if $job.email_error}class="error"{/if}
- name="{$jobpref}[email]" value="{$job.email}" />
- <span class="flags">
- {include file="include/flags.radio.tpl" name="`$jobpref`[email_pub]" val=$job.mail_pub}
- </span>
+ <td class="titre">Description</td>
+ <td>
+ <input type="text" size="35" maxlength="120" {if $job.description_error}class="error"{/if}
+ name="{$jobpref}[description]" value="{$job.description}" /><br /><br />
</td>
</tr>
<tr class="pair">
<div style="float: left">
<div class="titre">Adresse</div>
<div class="flags">
- {include file="include/flags.radio.tpl" name="`$jobpref`[adr][pub]" val=$job.adr.pub}
+ {include file="include/flags.radio.tpl" name="`$jobpref`[w_adr][pub]" val=$job.w_adr.pub}
</div>
<div style="margin-top: 20px; clear: both">
- {include file="geoloc/form.address.tpl" name="`$jobpref`[adr]" id="`$jobid`_adr" adr=$job.adr}
+ {include file="geoloc/form.address.tpl" name="`$jobpref`[w_adr]" id="`$jobid`_adr" adr=$job.w_adr}
</div>
</div>
<div style="float: right; width: 50%">
- <div class="titre">Téléphone</div>
- <div class="flags">
- {include file="include/flags.radio.tpl" name="`$jobpref`[tel_pub]" val=$job.tel_pub}
+ {include file="include/emails.combobox.tpl" name=$jobpref|cat:'[w_email]' val=$job.w_email
+ class="pair" i=$i error=$job.w_email_error prefix="w_" pub=$job.w_email_pub isjob="1" id=$i}
+ <div class="titre">Page perso</div>
+ <input type="text" size="25" maxlength="255" {if $job.w_web_error}class="error"{/if}
+ name="{$jobpref}[w_web]" value="{$job.w_web}" />
+ </div>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td colspan="2">
+ {foreach from=$job.w_tel key=t item=tel}
+ <div id="{"`$jobid`_w_tel_`$t`"}" style="clear: both">
+ {include file="profile/phone.tpl" prefname="`$jobpref`[w_tel]" prefid="`$jobid`_w_tel" telid=$t tel=$tel}
+ </div>
+ {/foreach}
+ {if $job.w_tel|@count eq 0}
+ <div id="{"`$jobid`_w_tel_0"}" style="clear: both">
+ {include file="profile/phone.tpl" prefname="`$jobpref`[w_tel]" prefid="`$jobid`_w_tel" telid=0 tel=0}
</div>
- <table style="clear: both">
- <tr>
- <td>Bureau :</td>
- <td>
- <input type="text" size="18" maxlength="18" {if $job.tel_error}class="error"{/if}
- name="{$jobpref}[tel]" value="{$job.tel}" />
- </td>
- </tr>
- <tr>
- <td>Fax :</td>
- <td>
- <input type="text" size="18" maxlength="18" {if $job.fax_error}class="error"{/if}
- name="{$jobpref}[fax]" value="{$job.fax}" /></td>
- </tr>
- <tr>
- <td>Mobile :</td>
- <td>
- <input type="text" size="18" maxlength="18" {if $job.mobile_error}class="error"{/if}
- name="{$jobpref}[mobile]" value="{$job.mobile}" />
- </td>
- </tr>
- </table>
+ {/if}
+ <div id="{$jobid}_w_tel_add" class="center" style="clear: both; padding-top: 4px;">
+ <a href="javascript:addTel('{$jobid}_w_tel', '{$jobpref}[w_tel]')">
+ {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone
+ </a>
</div>
</td>
</tr>