Fixes time saving and uses CRLF in address text because of RFC 1738.
[platal.git] / templates / profile / jobs.job.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
8d84c630 3{* Copyright (C) 2003-2009 Polytechnique.org *}
0337d704 4{* http://opensource.polytechnique.org/ *}
5{* *}
6{* This program is free software; you can redistribute it and/or modify *}
7{* it under the terms of the GNU General Public License as published by *}
8{* the Free Software Foundation; either version 2 of the License, or *}
9{* (at your option) any later version. *}
10{* *}
11{* This program is distributed in the hope that it will be useful, *}
12{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14{* GNU General Public License for more details. *}
15{* *}
16{* You should have received a copy of the GNU General Public License *}
17{* along with this program; if not, write to the Free Software *}
18{* Foundation, Inc., *}
19{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
20{* *}
21{**************************************************************************}
22
541e8d03 23{assign var=jobid value="job_"|cat:$i}
37d44b3b 24{assign var=jobpref value="jobs[`$i`]"}
b814a8b8
SJ
25{assign var=sector_text value="sector_text_"|cat:$i}
26{assign var=sector value="sector_"|cat:$i}
27{assign var=entreprise value="entreprise_"|cat:$i}
2dcac0f5
FB
28<div id="{$jobid}">
29 <input type="hidden" name="{$jobpref}[removed]" value="0" />
30 <input type="hidden" name="{$jobpref}[new]" value="{if $new}1{else}0{/if}" />
31 <table id="{$jobid}_grayed" class="bicol" style="display: none; margin-bottom: 1em">
32 <tr>
33 <th class="grayed">
34 <div style="float: right">
35 <a href="javascript:restoreJob('{$jobid}', '{$jobpref}')">{icon name=arrow_refresh title="Restaure l'emploi"}</a>
77842972 36 </div>
37d44b3b 37 Restaurer l'entreprise n°{$i+1}&nbsp;:&nbsp;<span id="{$jobid}_grayed_name"></span>
2dcac0f5
FB
38 </th>
39 </tr>
40 </table>
41 <table id="{$jobid}_cont" class="bicol" summary="Entreprise n°{$i+1}" style="margin-bottom: 1em">
42 <tr>
43 <th colspan="2" style="text-align: right">
44 <div class="flags" style="float: left; text-align: left">
ee12da4e 45 {include file="include/flags.radio.tpl" name="`$jobpref`[pub]" val=$job.pub}
77842972 46 </div>
4f06d57b 47 Entreprise n°{$i+1}&nbsp;:
b814a8b8 48 {if $job.tmp_name}{$job.tmp_name} <small>(en cours de validation)</small>{else}
f3b2736f 49 <input type="text" class="enterpriseName {if $job.name_error}error{/if}" size="35" maxlength="100"
c7139c07 50 name="{$jobpref}[name]" value="{$job.name}" />
b814a8b8 51 {/if}
4f06d57b
SJ
52 <a href="javascript:removeJob('{$jobid}', '{$jobpref}')">
53 {icon name=cross title="Supprimer cet emploi"}
54 </a>
55 </th>
b814a8b8
SJ
56 </tr>
57 {if !$job.tmp_name}
58 <tr class="{$entreprise}">
59 <td class="center" colspan="2">
60 <small>Si ton entreprise ne figure pas dans la liste,
61 <a href="javascript:addEntreprise({$i})">clique ici</a> et complète les informations la concernant.</small>
62 </td>
63 </tr>
64 {/if}
65 <tr class="{$entreprise}" style="display: none">
66 <td class="titre">Acronyme</td>
67 <td>
68 <input type="text" size="35" maxlength="255" {if $job.acronym_error}class="error"{/if}
541e8d03 69 name="{$jobpref}[hq_acronym]" value="{$job.hq_acronym}" />
b814a8b8
SJ
70 </td>
71 </tr>
72 <tr class="{$entreprise}" style="display: none">
4f06d57b 73 <td class="titre">Page web</td>
b814a8b8 74 <td>
541e8d03
SJ
75 <input type="text" size="35" maxlength="255" {if $job.hq_url}class="error"{/if}
76 name="{$jobpref}[hq_url]" value="{$job.hq_url}" />
b814a8b8
SJ
77 </td>
78 </tr>
79 <tr class="{$entreprise}" style="display: none">
80 <td class="titre">Email de contact</td>
81 <td>
82 <input type="text" maxlength="60" {if $job.hq_email_error}class="error"{/if}
83 name="{$jobpref}[hq_email]" value="{$job.hq_email}" />
84 </td>
85 </tr>
0bcc8717 86 <tr class="{$entreprise}" style="display: none">
b814a8b8
SJ
87 <td colspan="2">
88 <div style="float: left">
89 <div class="titre">Adresse du siège</div>
90 <div style="margin-top: 20px; clear: both">
541e8d03
SJ
91 {include file="geoloc/form.address.tpl" prefname="`$jobpref`[hq_address]"
92 prefid="`$jobid`_address" address=$job.hq_address}
b814a8b8
SJ
93 </div>
94 </div>
95 </td>
0bcc8717 96 </tr>
b814a8b8
SJ
97 <tr class="{$entreprise}" style="display: none">
98 <td class="titre">Téléphone</td>
99 <td>
100 <input type="text" maxlength="28" {if $job.hq_tel_error}class="error"{/if}
541e8d03 101 name="{$jobpref}[hq_phone]" value="{$job.hq_phone}" />
b814a8b8
SJ
102 </td>
103 </tr>
104 <tr class="{$entreprise}" style="display: none">
105 <td class="titre">Fax</td>
106 <td>
107 <input type="text" maxlength="28" {if $job.hq_fax_error}class="error"{/if}
108 name="{$jobpref}[hq_fax]" value="{$job.hq_fax}" />
37d44b3b 109 </td>
2dcac0f5 110 </tr>
c7139c07
SJ
111
112 <tr class="pair">
113 <td colspan="2" class="center" style="font-style: italic">Ta place dans l'entreprise</td>
114 </tr>
b814a8b8 115 <tr class="pair {$sector_text}">
2dcac0f5
FB
116 <td class="titre">Secteur d'activité</td>
117 <td>
f3b2736f 118 <input type="text" class="sectorName {if $job.sector_error}error{/if}" size="35" maxlength="100"
541e8d03 119 name="{$jobpref}[subSubSectorName]" value="{$job.subSubSectorName}" />
b814a8b8 120 <a href="javascript:displayAllSector({$i})">{icon name="table" title="Tous les secteurs"}</a>
c7139c07
SJ
121 </td>
122 </tr>
b814a8b8 123 <tr class="pair {$sector}" style="display: none">
07e72582 124 <td class="titre" rowspan="4">Secteur&nbsp;d'activité</td>
c7139c07 125 <td>
541e8d03 126 <select name="{$jobpref}[sector]" onchange="updateJobSector({$i}, '')">
2dcac0f5 127 <option value="">&nbsp;</option>
541e8d03
SJ
128 {foreach from=$sectors item=item}
129 <option value="{$item.id}" {if $item.id eq $job.sector}selected="selected"{/if}>
130 {$item.label}
2dcac0f5 131 </option>
01cb14ce 132 {/foreach}
2dcac0f5
FB
133 </select>
134 </td>
135 </tr>
b814a8b8 136 <tr class="pair {$sector}" style="display: none">
541e8d03
SJ
137 <td id="{$jobid}_subSector">
138 <input type="hidden" name="{$jobpref}[subSector]" value="{$job.subSector|default:'-1'}" />
02125f19 139 </td>
2dcac0f5 140 </tr>
b814a8b8 141 <tr class="pair {$sector}" style="display: none">
541e8d03
SJ
142 <td id="{$jobid}_subSubSector">
143 <input type="hidden" name="{$jobpref}[subSubSector]" value="{$job.subSubSector|default:'-1'}" />
02125f19 144 </td>
2dcac0f5 145 </tr>
07e72582
SJ
146 <tr class="pair {$sector}" style="display: none">
147 <td id="{$jobid}_alternates">
148 </td>
149 </tr>
c7139c07 150 <tr class="pair">
c7139c07
SJ
151 <td class="titre">Description</td>
152 <td>
153 <input type="text" size="35" maxlength="120" {if $job.description_error}class="error"{/if}
541e8d03 154 name="{$jobpref}[description]" value="{$job.description}" />
30c895be
SJ
155 </td>
156 </tr>
2dcac0f5 157 <tr class="pair">
0bcc8717
SJ
158 <td class="titre">Page&nbsp;perso</td>
159 <td>
541e8d03
SJ
160 <input type="text" size="35" maxlength="255" {if $job.w_rul}class="error"{/if}
161 name="{$jobpref}[w_url]" value="{$job.w_url}" />
0bcc8717
SJ
162 </td>
163 </tr>
164 <tr class="pair">
2dcac0f5
FB
165 <td colspan="2">
166 <div style="float: left">
167 <div class="titre">Adresse</div>
168 <div class="flags">
541e8d03 169 {include file="include/flags.radio.tpl" name="`$jobpref`[w_address][pub]" val=$job.w_address.pub}
2dcac0f5
FB
170 </div>
171 <div style="margin-top: 20px; clear: both">
541e8d03
SJ
172 {include file="geoloc/form.address.tpl" prefname="`$jobpref`[w_address]"
173 prefid=$jobid address=$job.w_address}
2dcac0f5 174 </div>
77842972 175 </div>
bde2be3b
GB
176 </td>
177 </tr>
0bcc8717
SJ
178 {include file="include/emails.combobox.tpl" name=$jobpref|cat:'[w_email]' val=$job.w_email
179 class="pair" i=$i error=$job.w_email_error prefix="w_" pub=$job.w_email_pub id=$i}
bde2be3b
GB
180 <tr class="pair">
181 <td colspan="2">
541e8d03
SJ
182 {foreach from=$job.w_phone key=t item=phone}
183 <div id="{"`$jobid`_w_phone_`$t`"}" style="clear: both">
184 {include file="profile/phone.tpl" prefname="`$jobpref`[w_phone]" prefid="`$jobid`_w_phone" telid=$t tel=$phone}
bde2be3b
GB
185 </div>
186 {/foreach}
541e8d03
SJ
187 {if $job.w_phone|@count eq 0}
188 <div id="{"`$jobid`_w_phone_0"}" style="clear: both">
189 {include file="profile/phone.tpl" prefname="`$jobpref`[w_phone]" prefid="`$jobid`_w_phone" telid=0 tel=0}
2dcac0f5 190 </div>
bde2be3b 191 {/if}
541e8d03
SJ
192 <div id="{$jobid}_w_phone_add" class="center" style="clear: both; padding-top: 4px;">
193 <a href="javascript:addTel('{$jobid}_w_phone', '{$jobpref}[w_phone]')">
bde2be3b
GB
194 {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone
195 </a>
2dcac0f5
FB
196 </div>
197 </td>
198 </tr>
199 </table>
200</div>
0337d704 201
a7de4ef7 202{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}