Fixes search on locality modification.
[platal.git] / templates / search / adv.form.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
5e1513f6 3{* Copyright (C) 2003-2011 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
1f17ab93 23<h1>Recherche dans l'annuaire</h1>
0337d704 24
39394cbf
SJ
25{if hasPerm('edit_directory,admin') && t($suggestAddresses)}
26<p class="center"><strong>Voulez-vous télécharger le <a href="{$globals->baseurl}/search/adv/addresses{$plset_args}">tableau des adresses postales</a> pour la recette précédente&nbsp;?</strong></p>
27{/if}
28
f06a6d2b 29<script type="text/javascript">// <!--
63c89179 30 var baseurl = $.plURL("search/");
f06a6d2b 31 {literal}
63c89179 32
f06a6d2b
OLF
33 // display an autocomplete row : blabla (nb of found matches)
34 function make_format_autocomplete(block) {
35 return function(row) {
36 regexp = new RegExp('(' + RegExp.escape(block.value) + ')', 'i');
f1de811f 37
fb6dc875 38 name = row[0].htmlEntities().replace(regexp, '<strong>$1<\/strong>');
f1de811f 39
b3ec63d5 40 if (row[1] === "-1") {
6e828e47 41 return '&hellip;';
66f2b6b3 42 }
f1de811f 43
fb6dc875
PC
44 if (row[1] === "-2") {
45 return '<em>aucun camarade trouvé pour '+row[0].htmlEntities()+'<\/em>';
46 }
47
8a28e579
SJ
48 camarades = (row[1] > 1) ? "camarades" : "camarade";
49
fb6dc875 50 return name + '<em>&nbsp;&nbsp;-&nbsp;&nbsp;' + row[1].htmlEntities() + '&nbsp;' + camarades + '<\/em>';
f06a6d2b
OLF
51 };
52 }
f1de811f 53
a67a14b4
SJ
54 function setAddress(i, j, values)
55 {
56 var types = new Array('country', 'administrative_area_level_1', 'administrative_area_level_2', 'administrative_area_level_3', 'locality', 'sublocality');
57 var prev_type = types[i];
58 var next_type = types[j];
59 var next_list = next_type + '_list';
60
61 if (j == 3) {
62 $('tr#locality_text').hide()
63 $("select[name='localityTxt']").attr('value', '');
64 }
65
66 $("[name='" + next_type + "']").parent().load(baseurl + 'list/' + next_type, { previous:prev_type, value:values[i] }, function() {
67 if ($("select[name='" + next_type + "']").children("option").size() > 1) {
68 $("tr#" + next_list).show();
69 $("select[name='" + next_type + "']").attr('value', values[j]);
70 if (j < 6) {
71 setAddress(j, j + 1, values);
72 }
73 } else {
74 $("tr#" + next_list).hide();
75 $("select[name='" + next_type + "']").attr('value', '');
76 if (j < 6) {
77 setAddress(i, j + 1, values);
78 }
79 }
80 });
f1de811f 81
a67a14b4 82 }
f1de811f 83
a67a14b4
SJ
84 function displayNextAddressComponent(i, j, value)
85 {
86 var types = new Array('country', 'administrative_area_level_1', 'administrative_area_level_2', 'administrative_area_level_3', 'locality', 'sublocality');
87 var prev_type = types[i];
88 var next_type = types[j];
89 var next_list = next_type + '_list';
f1de811f 90
a67a14b4
SJ
91 if (j == 3) {
92 $('tr#locality_text').hide()
93 $("select[name='localityTxt']").attr('value', '');
94 }
f1de811f 95
a67a14b4
SJ
96 $("[name='" + next_type + "']").parent().load(baseurl + 'list/' + next_type, { previous:prev_type, value:value }, function() {
97 $("select[name='" + next_type + "']").attr('value', '');
98 if ($("select[name='" + next_type + "']").children("option").size() > 1) {
99 $("tr#" + next_list).show();
100 } else {
101 $("tr#" + next_list).hide();
102 if (j < 6) {
103 displayNextAddressComponent(i, j + 1, value);
104 }
105 }
106 });
107 }
f1de811f 108
a67a14b4
SJ
109 function changeAddressComponents(type, value)
110 {
111 var types = new Array('country', 'administrative_area_level_1', 'administrative_area_level_2', 'administrative_area_level_3', 'locality', 'sublocality');
112 var i = 0, j = 0;
f1de811f 113
a67a14b4
SJ
114 while (types[i] != type && i < 6) {
115 ++i;
e429cd03 116 }
e429cd03 117
a67a14b4
SJ
118 j = i + 1;
119 while (j < 6) {
120 $("select[name='" + types[j] + "']").attr('value', '');
121 $("tr#" + types[j] + "_list").hide();
122 ++j;
123 }
124
125 if (value != '' && i < 5) {
126 $("select[name='" + type + "']").attr('value', value);
127 displayNextAddressComponent(i, i + 1, value);
f06a6d2b
OLF
128 }
129 }
f1de811f 130
f06a6d2b
OLF
131 // when changing school, open diploma choice
132 function changeSchool(schoolId) {
1bdd08a7 133 $(".autocompleteTarget[name='school']").attr('value',schoolId);
f1de811f 134
f06a6d2b 135 if (schoolId) {
1bdd08a7 136 $(".autocomplete[name='schoolTxt']").addClass('hidden_valid');
f06a6d2b 137 } else {
1bdd08a7 138 $(".autocomplete[name='schoolTxt']").removeClass('hidden_valid');
f06a6d2b 139 }
f9817768 140
96d80a35
VZ
141 $("[name='diploma']").parent().load(baseurl + 'list/diploma/', { school:schoolId }, function() {
142 $("select[name='diploma']").attr('value', '{/literal}{$smarty.request.diploma}{literal}');
f9817768 143 });
f06a6d2b 144 }
f1de811f 145
d5c93dbb
RB
146 // when checking/unchecking "only_referent", disable/enable some fields
147 function changeOnlyReferent() {
148 if ($("#only_referent").is(':checked')) {
149 $("input[name='entreprise']").attr('disabled', true);
150 } else {
151 $("input[name='entreprise']").removeAttr('disabled');
152 }
153 }
154
3ac45f10
PC
155 // when choosing a job term in tree, hide tree and set job term field
156 function searchForJobTerm(treeid, jtid, full_name) {
157 $(".term_tree").remove();
158 $("input[name='jobtermTxt']").val(full_name).addClass("hidden_valid").show();
159 $("input[name='jobterm']").val(jtid);
160 }
161
fb6dc875
PC
162 function cancel_autocomplete(field, realfield) {
163 $(".autocomplete[name='"+field+"']").removeClass('hidden_valid').val('').focus();
164 if (typeof(realfield) != "undefined") {
165 $(".autocompleteTarget[name='"+realfield+"']").val('');
166 }
167 return;
168 }
169
f06a6d2b
OLF
170 // when choosing autocomplete from list, must validate
171 function select_autocomplete(name) {
172 nameRealField = name.replace(/Txt$/, '');
f1de811f 173
f06a6d2b
OLF
174 // nothing to do if field is not a text field for a list
175 if (nameRealField == name)
176 return null;
f1de811f 177
a67a14b4
SJ
178 // When changing country or locality, open next address component.
179 if (nameRealField == 'country' || nameRealField == 'locality') {
f06a6d2b 180 return function(i) {
a67a14b4 181 nameRealField = name.replace(/Txt$/, '');
fb6dc875 182 if (i.extra[0] < 0) {
a67a14b4 183 cancel_autocomplete(name, nameRealField);
fb6dc875
PC
184 i.extra[1] = '';
185 }
a67a14b4
SJ
186 $("[name='" + nameRealField + "']").parent().load(baseurl + 'list/' + nameRealField, function() {
187 $("select[name='" + nameRealField + "']").attr('value', i.extra[1]);
188 });
189 changeAddressComponents(nameRealField, i.extra[1]);
66f2b6b3 190 }
a67a14b4 191 }
f1de811f 192
f06a6d2b
OLF
193 if (nameRealField == 'school')
194 return function(i) {
fb6dc875
PC
195 if (i.extra[0] < 0) {
196 cancel_autocomplete('schoolTxt', 'school');
197 i.extra[1] = '';
198 }
f06a6d2b
OLF
199 changeSchool(i.extra[1]);
200 }
f1de811f 201
f06a6d2b
OLF
202 // change field in list and display text field as valid
203 return function(i) {
204 nameRealField = this.field.replace(/Txt$/, '');
f1de811f 205
fb6dc875
PC
206 if (i.extra[0] < 0) {
207 cancel_autocomplete(this.field, nameRealField);
208 return;
209 }
210
1bdd08a7 211 $(".autocompleteTarget[name='"+nameRealField+"']").attr('value',i.extra[1]);
f1de811f 212
1bdd08a7 213 $(".autocomplete[name='"+this.field+"']").addClass('hidden_valid');
f06a6d2b
OLF
214 }
215 }
f1de811f 216
4171c0bf 217 $(function() {
f06a6d2b
OLF
218 $(".autocompleteTarget").hide();
219 $(".autocomplete").show().each(function() {
220 targeted = $("../.autocompleteTarget",this)[0];
f1de811f 221
f06a6d2b
OLF
222 if (targeted && targeted.value) {
223 me = $(this);
f1de811f 224
f06a6d2b
OLF
225 $.get(baseurl + 'list/'+ targeted.name +'/'+targeted.value, {},function(textValue) {
226 me.attr('value', textValue);
227 me.addClass('hidden_valid');
228 });
229 }
f1de811f 230
f06a6d2b
OLF
231 $(this).autocomplete(baseurl + "autocomplete/"+this.name,{
232 selectOnly:1,
233 formatItem:make_format_autocomplete(this),
234 field:this.name,
235 onItemSelect:select_autocomplete(this.name),
236 matchSubset:0,
237 width:$(this).width()});
238 });
f1de811f 239
f06a6d2b 240 $(".autocomplete").change(function() { $(this).removeClass('hidden_valid'); });
f1de811f 241
a67a14b4
SJ
242 if ({/literal}'{$smarty.request.country}'{literal} != '') {
243 $("[name='country']").parent().load(baseurl + 'list/country', function() {
244 $("select[name='country']").attr('value', {/literal}'{$smarty.request.country}'{literal});
245 });
246 setAddress(0, 1, new Array({/literal}'{$smarty.request.country}'{literal},
247 {/literal}'{$smarty.request.administrative_area_level_1}'{literal},
248 {/literal}'{$smarty.request.administrative_area_level_2}'{literal},
249 {/literal}'{$smarty.request.administrative_area_level_3}'{literal},
250 {/literal}'{$smarty.request.locality}'{literal},
251 {/literal}'{$smarty.request.sublocality}'{literal})
252 );
253 } else {
254 var types = new Array('administrative_area_level_1', 'administrative_area_level_2', 'administrative_area_level_3', 'locality', 'sublocality');
255 for (var i = 0; i < 5; ++i) {
256 $("tr#" + types[i] + '_list').hide();
257 }
258 }
f1de811f 259
1bdd08a7 260 $(".autocomplete[name='schoolTxt']").change(function() { changeSchool(''); });
f1de811f 261
f06a6d2b 262 changeSchool({/literal}'{$smarty.request.school}'{literal});
f1de811f 263
f06a6d2b
OLF
264 $(".autocompleteToSelect").each(function() {
265 var fieldName = $(this).attr('href');
f1de811f 266
f06a6d2b 267 $(this).attr('href', baseurl + 'list/'+fieldName).click(function() {
1bdd08a7 268 var oldval = $("input.autocompleteTarget[name='"+fieldName+"']")[0].value;
f1de811f 269
1bdd08a7 270 $(".autocompleteTarget[name='"+fieldName+"']").parent().load(baseurl + 'list/'+fieldName,{},
f06a6d2b 271 function(selectBox) {
1bdd08a7
SJ
272 $(".autocompleteTarget[name='"+fieldName+"']").remove();
273 $(".autocomplete[name='"+fieldName+"Txt']").remove();
274 $("select[name='"+fieldName+"']").attr('value', oldval);
66f2b6b3 275 });
f1de811f 276
f06a6d2b 277 return false;
66f2b6b3 278 });
7d7b287c
OLF
279 }).parent().find('.autocomplete').change(function() {
280 // If we change the value in the type="text" field, then the value in the 'integer id' field must not be used,
281 // to ensure that, we unset it
282 $(this).parent().find('.autocompleteTarget').val('');
f06a6d2b 283 });
d5c93dbb
RB
284
285 $("#only_referent").change(function() { changeOnlyReferent(); });
d5c93dbb 286
f06a6d2b 287 });
21fb012b 288/** Regexps to wipe out from search queries */
1d364832 289var default_form_values = [ /&woman=0(&|$)/, /&subscriber=0(&|$)/, /&alive=0(&|$)/, /&egal[12]=[^&]*&promo[12]=(&|$)/g, /&networking_type=0(&|$)/, /&[^&=]+=(&|$)/g ];
21fb012b
PC
290/** Uses javascript to clean form from all empty fields */
291function cleanForm(f) {
292 var query = $(f).formSerialize();
293 var old_query;
e533246c
RB
294 for (var i in default_form_values) {
295 var reg = default_form_values[i];
296 if (typeof(reg) != "undefined") {
297 do {
298 old_query = query;
299 query = query.replace(reg, '$1');
300 } while (old_query != query);
301 }
21fb012b
PC
302 }
303 query = query.replace(/^&*(.*)&*$/, '$1');
fb6dc875 304 if (query == "rechercher=Chercher") {
21fb012b
PC
305 alert("Aucun critère n'a été spécifié");
306 return false;
307 }
106b0788 308 document.location = baseurl + 'adv?' + query;
21fb012b
PC
309 return false;
310}
f06a6d2b 311-->
a94040d2 312{/literal}</script>
ba50f03d 313<p class="center">[<a href="search">Revenir à la recherche simple</a>]</p>
21fb012b 314<form id="recherche" action="search/adv" method="get" onsubmit="return cleanForm(this)">
0337d704 315 <table class="bicol" cellpadding="3" summary="Recherche">
316 <tr>
1f17ab93 317 <th colspan="2">
ba50f03d 318 Recherche avancée
1f17ab93 319 </th>
320 </tr>
321 <tr>
6443c93d 322 <td>Nom, prénom, surnom...</td>
0337d704 323 <td>
66f2b6b3 324 <input type="hidden" name="rechercher" value="Chercher"/>
325 <input type="submit" style="display:none"/>
6443c93d 326 <input type="text" name="name" size="32" value="{$smarty.request.name}" />
5600b2fe
SJ
327 <select name="name_type">
328 <option value="" {if $smarty.request.name_type eq ''}selected="selected"{/if}>&nbsp;-&nbsp;</option>
329 <option value="lastname" {if $smarty.request.name_type eq 'lastname'}selected="selected"{/if}>nom</option>
330 <option value="firstname" {if $smarty.request.name_type eq 'firstname'}selected="selected"{/if}>prénom</option>
331 <option value="nickname" {if $smarty.request.name_type eq 'nickname'}selected="selected"{/if}>surnom</option>
332 </select>
0337d704 333 </td>
334 </tr>
335 <tr>
336 <td>Promotion</td>
337 <td>
89ee88f2
PC
338 <script type="text/javascript">/*<![CDATA[*/
339 {literal}
340 function updatepromofields(egal1) {
341 var f = egal1.form;
342 f.egal2.disabled = f.promo2.disabled = egal1.value == '=';
343 f.egal2.readOnly = true;
344 if (f.egal1.value == '>=') {
345 f.egal2.value = '<=';
346 } else {
347 f.egal2.value = '>=';
348 }
349 }
4171c0bf 350 $(function() { updatepromofields($('select[name=egal1]')[0]); });
89ee88f2
PC
351 {/literal}
352 /*]]>*/</script>
353 <select name="egal1" onchange="updatepromofields(this)" style="text-align:center">
0337d704 354 <option value="=" {if $smarty.request.egal1 eq "="}selected="selected"{/if}>&nbsp;=&nbsp;</option>
355 <option value="&gt;=" {if $smarty.request.egal1 eq "&gt;="}selected="selected"{/if}>&nbsp;&gt;=&nbsp;</option>
356 <option value="&lt;=" {if $smarty.request.egal1 eq "&lt;="}selected="selected"{/if}>&nbsp;&lt;=&nbsp;</option>
357 </select>
358 <input type="text" name="promo1" size="4" maxlength="4" value="{$smarty.request.promo1}" />
e803ded5 359 &nbsp;et&nbsp;
89ee88f2 360 <input type="text" name="egal2" size="1" style="text-align:center" value="{if t($smarty.request.egal2) eq '&lt;'}&lt;{else}&gt;{/if}" readonly="readonly" />
0337d704 361 <input type="text" name="promo2" size="4" maxlength="4" value="{$smarty.request.promo2}" />
e4937ecc
SJ
362 <select name="edu_type" style="text-align:center">
363 <option value="{#UserFilter::GRADE_ING#}" {if $smarty.request.edu_type eq #UserFilter::GRADE_ING#}selected="selected"{/if}>X</option>
364 <option value="{#UserFilter::GRADE_MST#}" {if $smarty.request.edu_type eq #UserFilter::GRADE_MST#}selected="selected"{/if}>Master</option>
365 <option value="{#UserFilter::GRADE_PHD#}" {if $smarty.request.edu_type eq #UserFilter::GRADE_PHD#}selected="selected"{/if}>Docteur</option>
366 </select>
0337d704 367 </td>
368 </tr>
369 <tr>
370 <td>Sexe</td>
371 <td>
372 <table>
373 <tr>
374 <td style="width:100px">
e803ded5 375 <input type="radio" name="woman" value="0" {if !$smarty.request.woman}checked="checked"{/if} id="woman0"/><label for="woman0">indifférent</label>
0337d704 376 </td>
377 <td style="width:100px">
e803ded5 378 <input type="radio" name="woman" value="1" {if $smarty.request.woman eq 1}checked="checked"{/if} id="woman1"/><label for="woman1">homme</label>
0337d704 379 </td>
380 <td style="width:100px">
e803ded5 381 <input type="radio" name="woman" value="2" {if $smarty.request.woman eq 2}checked="checked"{/if} id="woman2"/><label for="woman2">femme</label>
0337d704 382 </td>
383 </tr>
384 </table>
385 </td>
386 </tr>
387 <tr>
e803ded5 388 <td>Sur Polytechnique.org</td>
0337d704 389 <td>
390 <table>
391 <tr>
392 <td style="width:100px">
e803ded5 393 <input type="radio" name="subscriber" value="0" {if !$smarty.request.subscriber}checked="checked"{/if} id="subscriber0"/><label for="subscriber0">indifférent</label>
0337d704 394 </td>
395 <td style="width:100px">
e803ded5 396 <input type="radio" name="subscriber" value="1" {if $smarty.request.subscriber eq 1}checked="checked"{/if} id="subscriber1"/><label for="subscriber1">inscrit</label>
0337d704 397 </td>
398 <td style="width:100px">
e803ded5 399 <input type="radio" name="subscriber" value="2" {if $smarty.request.subscriber eq 2}checked="checked"{/if} id="subscriber2"/><label for="subscriber2">non inscrit</label>
0337d704 400 </td>
401 </tr>
402 </table>
403 </td>
404 </tr>
405 <tr>
c10e9a24
SJ
406 <td>A une redirection active</td>
407 <td>
408 <table>
409 <tr>
410 <td style="width:100px">
411 <input type="radio" name="has_email_redirect" value="0" {if !$smarty.request.has_email_redirect}checked="checked"{/if}
412 id="has_email_redirect0" /><label for="has_email_redirect0">indifférent</label>
413 </td>
414 <td style="width:100px">
415 <input type="radio" name="has_email_redirect" value="1" {if $smarty.request.has_email_redirect eq 1}checked="checked"{/if}
416 id="has_email_redirect1" /><label for="has_email_redirect1">oui</label>
417 </td>
418 <td style="width:100px">
419 <input type="radio" name="has_email_redirect" value="2" {if $smarty.request.has_email_redirect eq 2}checked="checked"{/if}
420 id="has_email_redirect2" /><label for="has_email_redirect2">non</label>
421 </td>
422 </tr>
423 </table>
424 </td>
425 </tr>
426 <tr>
0337d704 427 <td>En vie</td>
428 <td>
429 <table>
430 <tr>
431 <td style="width:100px">
e803ded5 432 <input type="radio" name="alive" value="0" {if !$smarty.request.alive}checked="checked"{/if} id="alive0"/><label for="alive0">indifférent</label>
0337d704 433 </td>
434 <td style="width:100px">
e803ded5 435 <input type="radio" name="alive" value="1" {if $smarty.request.alive eq 1}checked="checked"{/if} id="alive1"/><label for="alive1">vivant</label>
0337d704 436 </td>
437 <td style="width:100px">
e803ded5 438 <input type="radio" name="alive" value="2" {if $smarty.request.alive eq 2}checked="checked"{/if} id="alive2"/><label for="alive2">décédé</label>
0337d704 439 </td>
440 </tr>
441 </table>
442 </td>
443 </tr>
444 <tr>
56670b6a 445 <td colspan="2">
b16476f7 446 <input type="checkbox" name="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} id="sdxn" />
e803ded5 447 <label for="sdxn">Étendre par proximité sonore (uniquement sur nom et prénom).</label>
b16476f7 448 </td>
20ac3913 449 </tr>
b16476f7 450 <tr>
451 <th colspan="2">Géographie</th>
56670b6a 452 </tr>
453 <tr>
0337d704 454 <td>Pays</td>
455 <td>
b0691e10
FB
456 <input name="countryTxt" type="text" class="autocomplete" style="display:none" size="32"
457 value="{$smarty.request.countryTxt}"/>
66f2b6b3 458 <input name="country" class="autocompleteTarget" type="hidden" value="{$smarty.request.country}"/>
459 <a href="country" class="autocompleteToSelect">{icon name="table" title="Tous les pays"}</a>
0337d704 460 </td>
461 </tr>
a67a14b4
SJ
462 <tr id="administrative_area_level_1_list">
463 <td>Région, province, état&hellip;</td>
464 <td>
465 <input name="administrative_area_level_1" type="hidden" size="32" value="{$smarty.request.administrative_area_level_1}" />
466 </td>
467 </tr>
468 <tr id="administrative_area_level_2_list">
469 <td>Département, comté&hellip;</td>
470 <td>
471 <input name="administrative_area_level_2" type="hidden" size="32" value="{$smarty.request.administrative_area_level_2}" />
472 </td>
473 </tr>
474 <tr id="administrative_area_level_3_list">
475 <td>Canton&hellip;</td>
476 <td>
477 <input name="administrative_area_level_3" type="hidden" size="32" value="{$smarty.request.administrative_area_level_3}" />
478 </td>
479 </tr>
480 <tr id="locality_text">
481 <td>Ville</td>
875745ab 482 <td><input type="text" class="autocomplete" name="localityTxt" size="32" value="{$smarty.request.localityTxt}" /></td>
a67a14b4
SJ
483 </tr>
484 <tr id="locality_list">
485 <td>Ville</td>
486 <td>
487 <input name="locality" type="hidden" size="32" value="{$smarty.request.locality}" />
488 </td>
489 </tr>
490 <tr id="sublocality_list">
491 <td>Arrondissement, quartier&hellip;</td>
492 <td>
493 <input name="sublocality" type="hidden" size="32" value="{$smarty.request.sublocality}" />
494 </td>
495 </tr>
0337d704 496 <tr>
b16476f7 497 <td colspan="2">
aab2ffdd
SJ
498 <label for="only_current">
499 <input name="only_current" id="only_current" type="checkbox"{if $smarty.request.only_current} checked="checked"{/if}/>
500 Chercher uniquement les adresses où les camarades sont actuellement.
501 </label>
502 </td>
b16476f7 503 </tr>
504 <tr>
a7de4ef7 505 <th colspan="2">Activité</th>
0337d704 506 </tr>
507 <tr>
508 <td>Entreprise</td>
838cc16a 509 <td><input type="text" class="autocomplete" name="entreprise" size="32" value="{$smarty.request.entreprise}" /></td>
0337d704 510 </tr>
511 <tr>
c7139c07 512 <td>Description</td>
f3bfd6c9 513 <td><input type="text" class="autocomplete" name="jobdescription" size="32" value="{$smarty.request.jobdescription}" /></td>
0337d704 514 </tr>
515 <tr>
3ac45f10 516 <td>Mots-clefs</td>
0337d704 517 <td>
3ac45f10
PC
518 <input name="jobtermTxt" type="text" class="autocomplete{if $smarty.request.jobterm} hidden_valid{/if}" style="display:none" size="32"
519 value="{$smarty.request.jobtermTxt}"/>
520 <input name="jobterm" class="autocompleteTarget" type="hidden" value="{$smarty.request.jobterm}"/>
521 <a href="jobterm" class="autocompleteToSelect">{icon name="table" title="Tous les mots-clefs"}</a>
0337d704 522 </td>
523 </tr>
574f3cc3 524 {if hasPerm('directory_private')}
0337d704 525 <tr>
526 <td>CV contient</td>
527 <td><input type="text" name="cv" size="32" value="{$smarty.request.cv}" /></td>
528 </tr>
574f3cc3 529 {/if}
0337d704 530 <tr>
531 <td colspan="2">
f6818108 532 <input type='checkbox' name='only_referent' {if $smarty.request.only_referent}checked='checked'{/if} id="only_referent"/>
e803ded5 533 <label for="only_referent">Chercher uniquement parmi les camarades se proposant comme référents.</label>
0337d704 534 </td>
535 </tr>
536 <tr>
537 <th colspan="2">Divers</th>
538 </tr>
539 <tr>
a7de4ef7 540 <td>Nationalité</td>
0337d704 541 <td>
b0691e10
FB
542 <input name="nationaliteTxt" type="text" class="autocomplete" style="display:none" size="32"
543 value="{$smarty.request.nationaliteTxt}"/>
66f2b6b3 544 <input name="nationalite" class="autocompleteTarget" type="hidden" value="{$smarty.request.nationalite}"/>
545 <a href="nationalite" class="autocompleteToSelect">{icon name="table" title="Toutes les nationalités"}</a>
0337d704 546 </td>
547 </tr>
574f3cc3 548 {if hasPerm('directory_private')}
0337d704 549 <tr>
550 <td>Binet</td>
551 <td>
b0691e10
FB
552 <input name="binetTxt" type="text" class="autocomplete" style="display:none" size="32"
553 value="{$smarty.request.binetTxt}"/>
66f2b6b3 554 <input name="binet" class="autocompleteTarget" type="hidden" value="{$smarty.request.binet}"/>
555 <a href="binet" class="autocompleteToSelect">{icon name="table" title="Tous les binets"}</a>
0337d704 556 </td>
557 </tr>
574f3cc3 558 {/if}
0337d704 559 <tr>
560 <td>Groupe X</td>
561 <td>
b0691e10
FB
562 <input name="groupexTxt" type="text" class="autocomplete" style="display:none" size="32"
563 value="{$smarty.request.groupexTxt}"/>
66f2b6b3 564 <input name="groupex" class="autocompleteTarget" type="hidden" value="{$smarty.request.groupex}"/>
565 <a href="groupex" class="autocompleteToSelect">{icon name="table" title="Tous les groupes X"}</a>
0337d704 566 </td>
567 </tr>
574f3cc3 568 {if hasPerm('directory_private')}
0337d704 569 <tr>
570 <td>Section</td>
571 <td>
b0691e10
FB
572 <input name="sectionTxt" type="text" class="autocomplete" style="display:none" size="32"
573 value="{$smarty.request.sectionTxt}"/>
66f2b6b3 574 <input name="section" class="autocompleteTarget" type="hidden" value="{$smarty.request.section}"/>
575 <a href="section" class="autocompleteToSelect">{icon name="table" title="Toutes les sections"}</a>
0337d704 576 </td>
577 </tr>
574f3cc3 578 {/if}
0337d704 579 <tr>
580 <td>Formation</td>
581 <td>
b0691e10
FB
582 <input name="schoolTxt" type="text" class="autocomplete" style="display:none" size="32"
583 value="{$smarty.request.schoolTxt}"/>
66f2b6b3 584 <input name="school" class="autocompleteTarget" type="hidden" value="{$smarty.request.school}"/>
585 <a href="school" class="autocompleteToSelect">{icon name="table" title="Toutes les formations"}</a>
0337d704 586 </td>
587 </tr>
90b6b819 588 <tr>
f6818108 589 <td>Diplôme</td>
590 <td>
90b6b819 591 <input name="diploma" size="32" value="{$smarty.request.diploma}"/>
0337d704 592 </td>
593 </tr>
594 <tr>
00f25ab1
SJ
595 <td>Corps d'origine</td>
596 <td>
597 <select name="origin_corps">
598 {foreach from=$origin_corps_list key=id item=corps}
599 <option value="{$id}" {if $smarty.request.origin_corps eq $id}selected="selected"{/if}>{$corps}</option>
600 {/foreach}
601 </select>
602 </td>
603 </tr>
604 <tr>
605 <td>Corps actuel</td>
606 <td>
607 <select name="current_corps">
608 {foreach from=$current_corps_list key=id item=corps}
609 <option value="{$id}" {if $smarty.request.current_corps eq $id}selected="selected"{/if}>{$corps}</option>
610 {/foreach}
611 </select>
612 </td>
613 </tr>
614 <tr>
615 <td>Grade</td>
616 <td>
617 <select name="corps_rank">
618 {foreach from=$corps_rank_list key=id item=corps}
619 <option value="{$id}" {if $smarty.request.corps_rank eq $id}selected="selected"{/if}>{$corps}</option>
620 {/foreach}
621 </select>
622 </td>
623 </tr>
624 <tr>
0337d704 625 <td>Commentaire contient</td>
626 <td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
627 </tr>
14256b08 628 <tr>
93f3f260
GB
629 <td>Numéro de téléphone</td>
630 <td><input type="text" name="phone_number" size="32" value="{$smarty.request.phone_number}"/></td>
631 </tr>
632 <tr>
92c3f9e5
GB
633 <td style="vertical-align: middle">
634 <span>Networking et sites webs</span>
14256b08
GB
635 </td>
636 <td>
92c3f9e5
GB
637 <table>
638 <tr>
639 <td style="padding-left: 0px;">
640 <input type="text" name="networking_address" size="32" value="{$smarty.request.networking_address}" />
641 </td>
642 <td>
1d364832
RB
643 <select name="networking_type">
644 {foreach from=$networking_types key=id item=network}
645 <option value="{$id}" {if $smarty.request.networking_type eq $id}selected="selected"{/if}>{$network}</option>
646 {/foreach}
647 </select>
92c3f9e5
GB
648 </td>
649 </tr>
650 </table>
14256b08
GB
651 </td>
652 </tr>
0f567f55
RB
653 {if hasPerm('admin,edit_directory')}
654 <tr>
655 <td>Matricule AX</td>
656 <td>
657 <textarea name="schoolid_ax" rows="10" cols="12">{$smarty.request.schoolid_ax}</textarea>
658 <br />
659 <i>Entrer une liste de matricules AX (un par ligne)</i>
660 </td>
661 {/if}
1f17ab93 662 {if $smarty.session.auth ge AUTH_COOKIE}
e04e6ac2 663 </tr>
e803ded5
SJ
664 <tr>
665 <td colspan="2">
f6818108 666 <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} id="order"/>
e803ded5
SJ
667 <label for="order">Mettre les fiches modifiées récemment en premier.</label>
668 </td>
669 </tr>
b8c2ada6
SJ
670 <tr>
671 <td colspan="2">
672 <input type='checkbox' name='exact' id="exact" {if $smarty.request.exact}checked='checked'{/if} value='1'/>
673 <label for="exact">Faire une recherche exacte.</label>
674 </td>
675 </tr>
1f17ab93 676 {/if}
e803ded5
SJ
677 <tr><td colspan="2"></td></tr>
678 <tr>
679 <td colspan="2" style="text-align: center">
680 <input type="submit" value="Chercher" />
1f17ab93 681 </td>
682 </tr>
0337d704 683 </table>
cb4a0b71 684</form>
0337d704 685
a7de4ef7 686{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}