Specifies we only display places where profiles live.
[platal.git] / templates / search / adv.form.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 Polytechnique.org                             *}
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
23 <h1>Recherche dans l'annuaire</h1>
24
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
29 <script type="text/javascript">// <!--
30   var baseurl = $.plURL("search/");
31   {literal}
32
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');
37
38         name = row[0].htmlEntities().replace(regexp, '<strong>$1<\/strong>');
39
40         if (row[1] === "-1") {
41           return '&hellip;';
42         }
43
44         if (row[1] === "-2") {
45           return '<em>aucun camarade trouvé pour '+row[0].htmlEntities()+'<\/em>';
46         }
47
48         camarades = (row[1] > 1) ? "camarades" : "camarade";
49
50         return name + '<em>&nbsp;&nbsp;-&nbsp;&nbsp;' + row[1].htmlEntities() + '&nbsp;' + camarades + '<\/em>';
51       };
52   }
53
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     });
81
82   }
83
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';
90
91     if (j == 3) {
92       $('tr#locality_text').hide()
93       $("select[name='localityTxt']").attr('value', '');
94     }
95
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   }
108
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;
113
114     while (types[i] != type && i < 6) {
115       ++i;
116     }
117
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);
128     }
129   }
130
131   // when changing school, open diploma choice
132   function changeSchool(schoolId) {
133     $(".autocompleteTarget[name='school']").attr('value',schoolId);
134
135     if (schoolId) {
136       $(".autocomplete[name='schoolTxt']").addClass('hidden_valid');
137     } else {
138       $(".autocomplete[name='schoolTxt']").removeClass('hidden_valid');
139     }
140
141     $("[name='diploma']").parent().load(baseurl + 'list/diploma/', { school:schoolId }, function() {
142         $("select[name='diploma']").attr('value', '{/literal}{$smarty.request.diploma}{literal}');
143       });
144   }
145
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
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
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
170   // when choosing autocomplete from list, must validate
171   function select_autocomplete(name) {
172       nameRealField = name.replace(/Txt$/, '');
173
174       // nothing to do if field is not a text field for a list
175       if (nameRealField == name)
176         return null;
177
178       // When changing country or locality, open next address component.
179       if (nameRealField == 'country' || nameRealField == 'locality') {
180         return function(i) {
181             nameRealField = name.replace(/Txt$/, '');
182             if (i.extra[0] < 0) {
183               cancel_autocomplete(name, nameRealField);
184               i.extra[1] = '';
185             }
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]);
190           }
191       }
192
193       if (nameRealField == 'school')
194         return function(i) {
195             if (i.extra[0] < 0) {
196               cancel_autocomplete('schoolTxt', 'school');
197               i.extra[1] = '';
198             }
199             changeSchool(i.extra[1]);
200           }
201
202       // change field in list and display text field as valid
203       return function(i) {
204         nameRealField = this.field.replace(/Txt$/, '');
205
206         if (i.extra[0] < 0) {
207           cancel_autocomplete(this.field, nameRealField);
208           return;
209         }
210
211         $(".autocompleteTarget[name='"+nameRealField+"']").attr('value',i.extra[1]);
212
213         $(".autocomplete[name='"+this.field+"']").addClass('hidden_valid');
214       }
215     }
216
217   $(function() {
218       $(".autocompleteTarget").hide();
219       $(".autocomplete").show().each(function() {
220         targeted = $("../.autocompleteTarget",this)[0];
221
222         if (targeted && targeted.value) {
223           me = $(this);
224
225           $.get(baseurl + 'list/'+ targeted.name +'/'+targeted.value, {},function(textValue) {
226             me.attr('value', textValue);
227             me.addClass('hidden_valid');
228           });
229         }
230
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         });
239
240       $(".autocomplete").change(function() { $(this).removeClass('hidden_valid'); });
241
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       }
259
260       $(".autocomplete[name='schoolTxt']").change(function() { changeSchool(''); });
261
262       changeSchool({/literal}'{$smarty.request.school}'{literal});
263
264       $(".autocompleteToSelect").each(function() {
265           var fieldName = $(this).attr('href');
266
267           $(this).attr('href', baseurl + 'list/'+fieldName).click(function() {
268               var oldval = $("input.autocompleteTarget[name='"+fieldName+"']")[0].value;
269
270               $(".autocompleteTarget[name='"+fieldName+"']").parent().load(baseurl + 'list/'+fieldName,{},
271                 function(selectBox) {
272                   $(".autocompleteTarget[name='"+fieldName+"']").remove();
273                   $(".autocomplete[name='"+fieldName+"Txt']").remove();
274                   $("select[name='"+fieldName+"']").attr('value', oldval);
275                 });
276
277               return false;
278             });
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('');
283         });
284
285       $("#only_referent").change(function() { changeOnlyReferent(); });
286
287     });
288 /** Regexps to wipe out from search queries */
289 var default_form_values = [ /&woman=0(&|$)/, /&subscriber=0(&|$)/, /&alive=0(&|$)/, /&egal[12]=[^&]*&promo[12]=(&|$)/g, /&networking_type=0(&|$)/, /&[^&=]+=(&|$)/g ];
290 /** Uses javascript to clean form from all empty fields */
291 function cleanForm(f) {
292   var query = $(f).formSerialize();
293   var old_query;
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     }
302   }
303   query = query.replace(/^&*(.*)&*$/, '$1');
304   if (query == "rechercher=Chercher") {
305     alert("Aucun critère n'a été spécifié");
306     return false;
307   }
308   document.location = baseurl + 'adv?' + query;
309   return false;
310 }
311 -->
312 {/literal}</script>
313 <p class="center">[<a href="search">Revenir à la recherche simple</a>]</p>
314 <form id="recherche" action="search/adv" method="get" onsubmit="return cleanForm(this)">
315   <table class="bicol" cellpadding="3" summary="Recherche">
316     <tr>
317       <th colspan="2">
318         Recherche avancée
319       </th>
320     </tr>
321     <tr>
322       <td>Nom, prénom, surnom...</td>
323       <td>
324         <input type="hidden" name="rechercher" value="Chercher"/>
325         <input type="submit" style="display:none"/>
326         <input type="text" name="name" size="32" value="{$smarty.request.name}" />
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>
333       </td>
334     </tr>
335     <tr>
336       <td>Promotion</td>
337       <td>
338         {include file="include/select_promo.tpl" promo_data=$smarty.request egal1="egal1" egal2="egal2" promo1="promo1" promo2="promo2" edu_type="edu_type"}
339       </td>
340     </tr>
341     <tr>
342       <td>Sexe</td>
343       <td>
344         <table>
345           <tr>
346             <td style="width:100px">
347               <input type="radio" name="woman" value="0" {if !$smarty.request.woman}checked="checked"{/if} id="woman0"/><label for="woman0">indifférent</label>
348             </td>
349             <td style="width:100px">
350               <input type="radio" name="woman" value="1" {if $smarty.request.woman eq 1}checked="checked"{/if} id="woman1"/><label for="woman1">homme</label>
351             </td>
352             <td style="width:100px">
353               <input type="radio" name="woman" value="2" {if $smarty.request.woman eq 2}checked="checked"{/if} id="woman2"/><label for="woman2">femme</label>
354             </td>
355           </tr>
356         </table>
357       </td>
358     </tr>
359     <tr>
360       <td>Sur Polytechnique.org</td>
361       <td>
362         <table>
363           <tr>
364             <td style="width:100px">
365               <input type="radio" name="subscriber" value="0" {if !$smarty.request.subscriber}checked="checked"{/if} id="subscriber0"/><label for="subscriber0">indifférent</label>
366             </td>
367             <td style="width:100px">
368               <input type="radio" name="subscriber" value="1" {if $smarty.request.subscriber eq 1}checked="checked"{/if} id="subscriber1"/><label for="subscriber1">inscrit</label>
369             </td>
370             <td style="width:100px">
371               <input type="radio" name="subscriber" value="2" {if $smarty.request.subscriber eq 2}checked="checked"{/if} id="subscriber2"/><label for="subscriber2">non inscrit</label>
372             </td>
373           </tr>
374         </table>
375       </td>
376     </tr>
377     <tr>
378       <td>A une redirection active</td>
379       <td>
380         <table>
381           <tr>
382             <td style="width:100px">
383               <input type="radio" name="has_email_redirect" value="0" {if !$smarty.request.has_email_redirect}checked="checked"{/if}
384                 id="has_email_redirect0" /><label for="has_email_redirect0">indifférent</label>
385             </td>
386             <td style="width:100px">
387               <input type="radio" name="has_email_redirect" value="1" {if $smarty.request.has_email_redirect eq 1}checked="checked"{/if}
388                 id="has_email_redirect1" /><label for="has_email_redirect1">oui</label>
389             </td>
390             <td style="width:100px">
391               <input type="radio" name="has_email_redirect" value="2" {if $smarty.request.has_email_redirect eq 2}checked="checked"{/if}
392                 id="has_email_redirect2" /><label for="has_email_redirect2">non</label>
393             </td>
394           </tr>
395         </table>
396       </td>
397     </tr>
398     <tr>
399       <td>En vie</td>
400       <td>
401         <table>
402           <tr>
403             <td style="width:100px">
404               <input type="radio" name="alive" value="0" {if !$smarty.request.alive}checked="checked"{/if} id="alive0"/><label for="alive0">indifférent</label>
405             </td>
406             <td style="width:100px">
407               <input type="radio" name="alive" value="1" {if $smarty.request.alive eq 1}checked="checked"{/if} id="alive1"/><label for="alive1">vivant</label>
408             </td>
409             <td style="width:100px">
410               <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>
411             </td>
412           </tr>
413         </table>
414       </td>
415     </tr>
416     <tr>
417       <td colspan="2">
418         <input type="checkbox" name="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} id="sdxn" />
419         <label for="sdxn">Étendre par proximité sonore (uniquement sur nom et prénom).</label>
420       </td>
421     </tr>
422     <tr>
423       <th colspan="2">Géographie</th>
424     </tr>
425     <tr>
426       <td colspan="2" class="center"><small>Seuls les lieux où résident des camarades sont proposés ci-dessous.</small></td>
427     </tr>
428     <tr>
429       <td>Pays</td>
430       <td>
431         <input name="countryTxt" type="text" class="autocomplete" style="display:none" size="32"
432                value="{$smarty.request.countryTxt}"/>
433         <input name="country" class="autocompleteTarget" type="hidden" value="{$smarty.request.country}"/>
434         <a href="country" class="autocompleteToSelect">{icon name="table" title="Tous les pays"}</a>
435       </td>
436     </tr>
437     <tr id="administrative_area_level_1_list">
438       <td>Région, province, état&hellip;</td>
439       <td>
440         <input name="administrative_area_level_1" type="hidden" size="32" value="{$smarty.request.administrative_area_level_1}" />
441       </td>
442     </tr>
443     <tr id="administrative_area_level_2_list">
444       <td>Département, comté&hellip;</td>
445       <td>
446         <input name="administrative_area_level_2" type="hidden" size="32" value="{$smarty.request.administrative_area_level_2}" />
447       </td>
448     </tr>
449     <tr id="administrative_area_level_3_list">
450       <td>Canton&hellip;</td>
451       <td>
452         <input name="administrative_area_level_3" type="hidden" size="32" value="{$smarty.request.administrative_area_level_3}" />
453       </td>
454     </tr>
455     <tr id="locality_text">
456       <td>Ville</td>
457       <td><input type="text" class="autocomplete" name="localityTxt" size="32" value="{$smarty.request.localityTxt}" /></td>
458     </tr>
459     <tr id="locality_list">
460       <td>Ville</td>
461       <td>
462         <input name="locality" type="hidden" size="32" value="{$smarty.request.locality}" />
463       </td>
464     </tr>
465     <tr id="sublocality_list">
466       <td>Arrondissement, quartier&hellip;</td>
467       <td>
468         <input name="sublocality" type="hidden" size="32" value="{$smarty.request.sublocality}" />
469       </td>
470     </tr>
471     <tr>
472       <td colspan="2">
473         <label for="only_current">
474           <input name="only_current" id="only_current" type="checkbox"{if $smarty.request.only_current} checked="checked"{/if}/>
475           Chercher uniquement les adresses actuelles.
476         </label>
477       </td>
478     </tr>
479     <tr>
480       <th colspan="2">Activité</th>
481     </tr>
482     <tr>
483       <td>Entreprise</td>
484       <td><input type="text" class="autocomplete" name="entreprise" size="32" value="{$smarty.request.entreprise}" /></td>
485     </tr>
486     <tr>
487       <td>Description</td>
488       <td><input type="text" class="autocomplete" name="jobdescription" size="32" value="{$smarty.request.jobdescription}" /></td>
489     </tr>
490     <tr>
491       <td>Mots-clefs</td>
492       <td>
493         <input name="jobtermTxt" type="text" class="autocomplete{if $smarty.request.jobterm} hidden_valid{/if}" style="display:none" size="32"
494                value="{$smarty.request.jobtermTxt}"/>
495         <input name="jobterm" class="autocompleteTarget" type="hidden" value="{$smarty.request.jobterm}"/>
496         <a href="jobterm" class="autocompleteToSelect">{icon name="table" title="Tous les mots-clefs"}</a>
497       </td>
498     </tr>
499     {if hasPerm('directory_private')}
500     <tr>
501       <td>CV contient</td>
502       <td><input type="text" name="cv" size="32" value="{$smarty.request.cv}" /></td>
503     </tr>
504     {/if}
505     <tr>
506       <td colspan="2">
507         <input type='checkbox' name='only_referent' {if $smarty.request.only_referent}checked='checked'{/if} id="only_referent"/>
508         <label for="only_referent">Chercher uniquement parmi les camarades se proposant comme référents.</label>
509       </td>
510     </tr>
511     <tr>
512       <th colspan="2">Divers</th>
513     </tr>
514     <tr>
515       <td>Nationalité</td>
516       <td>
517         <input name="nationaliteTxt" type="text" class="autocomplete" style="display:none" size="32"
518                value="{$smarty.request.nationaliteTxt}"/>
519         <input name="nationalite" class="autocompleteTarget" type="hidden" value="{$smarty.request.nationalite}"/>
520         <a href="nationalite" class="autocompleteToSelect">{icon name="table" title="Toutes les nationalités"}</a>
521       </td>
522     </tr>
523     {if hasPerm('directory_private')}
524     <tr>
525       <td>Binet</td>
526       <td>
527         <input name="binetTxt" type="text" class="autocomplete" style="display:none" size="32"
528                value="{$smarty.request.binetTxt}"/>
529         <input name="binet" class="autocompleteTarget" type="hidden" value="{$smarty.request.binet}"/>
530         <a href="binet" class="autocompleteToSelect">{icon name="table" title="Tous les binets"}</a>
531       </td>
532     </tr>
533     {/if}
534     <tr>
535       <td>Groupe X</td>
536       <td>
537         <input name="groupexTxt" type="text" class="autocomplete" style="display:none" size="32"
538                value="{$smarty.request.groupexTxt}"/>
539         <input name="groupex" class="autocompleteTarget" type="hidden" value="{$smarty.request.groupex}"/>
540         <a href="groupex" class="autocompleteToSelect">{icon name="table" title="Tous les groupes X"}</a>
541       </td>
542     </tr>
543     {if hasPerm('directory_private')}
544     <tr>
545       <td>Section</td>
546       <td>
547         <input name="sectionTxt" type="text" class="autocomplete" style="display:none" size="32"
548                value="{$smarty.request.sectionTxt}"/>
549         <input name="section" class="autocompleteTarget" type="hidden" value="{$smarty.request.section}"/>
550         <a href="section" class="autocompleteToSelect">{icon name="table" title="Toutes les sections"}</a>
551       </td>
552     </tr>
553     {/if}
554     <tr>
555       <td>Formation</td>
556       <td>
557         <input name="schoolTxt" type="text" class="autocomplete" style="display:none" size="32"
558                value="{$smarty.request.schoolTxt}"/>
559         <input name="school" class="autocompleteTarget" type="hidden" value="{$smarty.request.school}"/>
560         <a href="school" class="autocompleteToSelect">{icon name="table" title="Toutes les formations"}</a>
561       </td>
562     </tr>
563     <tr>
564       <td>Diplôme</td>
565       <td>
566         <input name="diploma" size="32" value="{$smarty.request.diploma}"/>
567       </td>
568     </tr>
569     <tr>
570       <td>Corps d'origine</td>
571       <td>
572         <select name="origin_corps">
573         {foreach from=$origin_corps_list key=id item=corps}
574           <option value="{$id}" {if $smarty.request.origin_corps eq $id}selected="selected"{/if}>{$corps}</option>
575         {/foreach}
576         </select>
577       </td>
578     </tr>
579     <tr>
580       <td>Corps actuel</td>
581       <td>
582         <select name="current_corps">
583         {foreach from=$current_corps_list key=id item=corps}
584           <option value="{$id}" {if $smarty.request.current_corps eq $id}selected="selected"{/if}>{$corps}</option>
585         {/foreach}
586         </select>
587       </td>
588     </tr>
589     <tr>
590       <td>Grade</td>
591       <td>
592         <select name="corps_rank">
593         {foreach from=$corps_rank_list key=id item=corps}
594           <option value="{$id}" {if $smarty.request.corps_rank eq $id}selected="selected"{/if}>{$corps}</option>
595         {/foreach}
596         </select>
597       </td>
598     </tr>
599     <tr>
600       <td>Commentaire contient</td>
601       <td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
602     </tr>
603     <tr>
604       <td>Numéro de téléphone</td>
605       <td><input type="text" name="phone_number" size="32" value="{$smarty.request.phone_number}"/></td>
606     </tr>
607     <tr>
608       <td style="vertical-align: middle">
609         <span>Networking et sites webs</span>
610       </td>
611       <td>
612         <table>
613           <tr>
614             <td style="padding-left: 0px;">
615               <input type="text" name="networking_address" size="32" value="{$smarty.request.networking_address}" />
616             </td>
617             <td>
618               <select name="networking_type">
619               {foreach from=$networking_types key=id item=network}
620                 <option value="{$id}" {if $smarty.request.networking_type eq $id}selected="selected"{/if}>{$network}</option>
621               {/foreach}
622               </select>
623             </td>
624           </tr>
625         </table>
626       </td>
627     </tr>
628         {if hasPerm('admin,edit_directory')}
629     <tr>
630       <td>Matricule AX</td>
631       <td>
632         <textarea name="schoolid_ax" rows="10" cols="12">{$smarty.request.schoolid_ax}</textarea>
633         <br />
634         <i>Entrer une liste de matricules AX (un par ligne)</i>
635       </td>
636         {/if}
637         {if $smarty.session.auth ge AUTH_COOKIE}
638     </tr>
639     <tr>
640       <td colspan="2">
641           <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} id="order"/>
642           <label for="order">Mettre les fiches modifiées récemment en premier.</label>
643       </td>
644     </tr>
645     <tr>
646       <td colspan="2">
647            <input type='checkbox' name='exact' id="exact" {if $smarty.request.exact}checked='checked'{/if} value='1'/>
648            <label for="exact">Faire une recherche exacte.</label>
649       </td>
650     </tr>
651         {/if}
652     <tr><td colspan="2"></td></tr>
653     <tr>
654       <td colspan="2" style="text-align: center">
655           <input type="submit" value="Chercher" />
656       </td>
657     </tr>
658   </table>
659 </form>
660
661 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}