Merge branch 'xorg/maint' into xorg/master
[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   // when changing country, open up administrativearea choice
55   function changeCountry(a2) {
56     $(".autocompleteTarget[name='country']").attr('value',a2);
57
58     if (a2) {
59       $(".autocomplete[name='countryTxt']").addClass('hidden_valid');
60
61       $("[name='administrativearea']").parent().load(baseurl + 'list/administrativearea/', { country:a2 }, function() {
62           if ($("select[name='administrativearea']").children("option").size() > 1) {
63             $("select[name='administrativearea']").attr('value', '{/literal}{$smarty.request.administrativearea}{literal}');
64
65             $("tr#administrativearea_list").show();
66           } else {
67             $("select[name='administrativearea']").attr('value', '');
68
69             $("tr#administrativearea_list").hide();
70           }
71         });
72     } else {
73       $(".autocomplete[name='countryTxt']").removeClass('hidden_valid');
74
75       $("select[name='administrativearea']").attr('value', '');
76       $("select[name='subadministrativearea']").attr('value', '');
77
78       $("tr#administrativearea_list").hide();
79       $("tr#subadministrativearea_list").hide();
80     }
81   }
82
83   // when changing administrativearea, open up subadministrativearea choice
84   function changeAdministrativeArea(id) {
85     if (id) {
86       $("[name='subadministrativearea']").parent().load(baseurl + 'list/subadministrativearea/', { administrativearea:id }, function() {
87           if ($("select[name='subadministrativearea']").children("option").size() > 1) {
88             $("select[name='subadministrativearea']").attr('value', '{/literal}{$smarty.request.subadministrativearea}{literal}');
89             $("tr#subadministrativearea_list").show();
90           } else {
91             $("select[name='subadministrativearea']").attr('value', '');
92             $("tr#subadministrativearea_list").hide();
93           }
94         });
95     } else {
96       $("select[name='subadministrativearea']").attr('value', '');
97       $("tr#subadministrativearea_list").hide();
98     }
99   }
100
101   // when changing school, open diploma choice
102   function changeSchool(schoolId) {
103     $(".autocompleteTarget[name='school']").attr('value',schoolId);
104
105     if (schoolId) {
106       $(".autocomplete[name='schoolTxt']").addClass('hidden_valid');
107     } else {
108       $(".autocomplete[name='schoolTxt']").removeClass('hidden_valid');
109     }
110
111     $("[name='diploma']").parent().load(baseurl + 'list/diploma/', { school:schoolId }, function() {
112         $("select[name='diploma']").attr('value', '{/literal}{$smarty.request.diploma}{literal}');
113       });
114   }
115
116   // when checking/unchecking "only_referent", disable/enable some fields
117   function changeOnlyReferent() {
118     if ($("#only_referent").is(':checked')) {
119       $("input[name='entreprise']").attr('disabled', true);
120     } else {
121       $("input[name='entreprise']").removeAttr('disabled');
122     }
123   }
124
125   // when choosing a job term in tree, hide tree and set job term field
126   function searchForJobTerm(treeid, jtid, full_name) {
127     $(".term_tree").remove();
128     $("input[name='jobtermTxt']").val(full_name).addClass("hidden_valid").show();
129     $("input[name='jobterm']").val(jtid);
130   }
131
132   function cancel_autocomplete(field, realfield) {
133     $(".autocomplete[name='"+field+"']").removeClass('hidden_valid').val('').focus();
134     if (typeof(realfield) != "undefined") {
135       $(".autocompleteTarget[name='"+realfield+"']").val('');
136     }
137     return;
138   }
139
140   // when choosing autocomplete from list, must validate
141   function select_autocomplete(name) {
142       nameRealField = name.replace(/Txt$/, '');
143
144       // nothing to do if field is not a text field for a list
145       if (nameRealField == name)
146         return null;
147
148       // if changing country, might want to open administrativearea choice
149       if (nameRealField == 'country')
150         return function(i) {
151             if (i.extra[0] < 0) {
152               cancel_autocomplete('countryTxt', 'country');
153               i.extra[1] = '';
154             }
155             changeCountry(i.extra[1]);
156           }
157
158       if (nameRealField == 'school')
159         return function(i) {
160             if (i.extra[0] < 0) {
161               cancel_autocomplete('schoolTxt', 'school');
162               i.extra[1] = '';
163             }
164             changeSchool(i.extra[1]);
165           }
166
167       // change field in list and display text field as valid
168       return function(i) {
169         nameRealField = this.field.replace(/Txt$/, '');
170
171         if (i.extra[0] < 0) {
172           cancel_autocomplete(this.field, nameRealField);
173           return;
174         }
175
176         $(".autocompleteTarget[name='"+nameRealField+"']").attr('value',i.extra[1]);
177
178         $(".autocomplete[name='"+this.field+"']").addClass('hidden_valid');
179       }
180     }
181
182   $(function() {
183       $(".autocompleteTarget").hide();
184       $(".autocomplete").show().each(function() {
185         targeted = $("../.autocompleteTarget",this)[0];
186
187         if (targeted && targeted.value) {
188           me = $(this);
189
190           $.get(baseurl + 'list/'+ targeted.name +'/'+targeted.value, {},function(textValue) {
191             me.attr('value', textValue);
192             me.addClass('hidden_valid');
193           });
194         }
195
196         $(this).autocomplete(baseurl + "autocomplete/"+this.name,{
197           selectOnly:1,
198           formatItem:make_format_autocomplete(this),
199           field:this.name,
200           onItemSelect:select_autocomplete(this.name),
201           matchSubset:0,
202           width:$(this).width()});
203         });
204
205       $(".autocomplete").change(function() { $(this).removeClass('hidden_valid'); });
206
207       $(".autocomplete[name='countryTxt']").change(function() { changeCountry(''); });
208
209       changeCountry({/literal}'{$smarty.request.country}'{literal});
210       changeAdministrativeArea({/literal}'{$smarty.request.administrativearea}'{literal});
211
212       $(".autocomplete[name='schoolTxt']").change(function() { changeSchool(''); });
213
214       changeSchool({/literal}'{$smarty.request.school}'{literal});
215
216       $(".autocompleteToSelect").each(function() {
217           var fieldName = $(this).attr('href');
218
219           $(this).attr('href', baseurl + 'list/'+fieldName).click(function() {
220               var oldval = $("input.autocompleteTarget[name='"+fieldName+"']")[0].value;
221
222               $(".autocompleteTarget[name='"+fieldName+"']").parent().load(baseurl + 'list/'+fieldName,{},
223                 function(selectBox) {
224                   $(".autocompleteTarget[name='"+fieldName+"']").remove();
225                   $(".autocomplete[name='"+fieldName+"Txt']").remove();
226                   $("select[name='"+fieldName+"']").attr('value', oldval);
227                 });
228
229               return false;
230             });
231         }).parent().find('.autocomplete').change(function() {
232           // If we change the value in the type="text" field, then the value in the 'integer id' field must not be used,
233           // to ensure that, we unset it
234           $(this).parent().find('.autocompleteTarget').val('');
235         });
236
237       $("#only_referent").change(function() { changeOnlyReferent(); });
238       changeOnlyReferent();
239
240     });
241 /** Regexps to wipe out from search queries */
242 var default_form_values = [ /&woman=0(&|$)/, /&subscriber=0(&|$)/, /&alive=0(&|$)/, /&egal[12]=[^&]*&promo[12]=(&|$)/g, /&networking_type=0(&|$)/, /&[^&=]+=(&|$)/g ];
243 /** Uses javascript to clean form from all empty fields */
244 function cleanForm(f) {
245   var query = $(f).formSerialize();
246   var old_query;
247   for (var i in default_form_values) {
248     var reg = default_form_values[i];
249     if (typeof(reg) != "undefined") {
250       do {
251         old_query = query;
252         query = query.replace(reg, '$1');
253       } while (old_query != query);
254     }
255   }
256   query = query.replace(/^&*(.*)&*$/, '$1');
257   if (query == "rechercher=Chercher") {
258     alert("Aucun critère n'a été spécifié");
259     return false;
260   }
261   document.location = baseurl + 'adv?' + query;
262   return false;
263 }
264 -->
265 {/literal}</script>
266 <p class="center">[<a href="search">Revenir à la recherche simple</a>]</p>
267 <form id="recherche" action="search/adv" method="get" onsubmit="return cleanForm(this)">
268   <table class="bicol" cellpadding="3" summary="Recherche">
269     <tr>
270       <th colspan="2">
271         Recherche avancée
272       </th>
273     </tr>
274     <tr>
275       <td>Nom, prénom, surnom...</td>
276       <td>
277         <input type="hidden" name="rechercher" value="Chercher"/>
278         <input type="submit" style="display:none"/>
279         <input type="text" name="name" size="32" value="{$smarty.request.name}" />
280         <select name="name_type">
281           <option value="" {if $smarty.request.name_type eq ''}selected="selected"{/if}>&nbsp;-&nbsp;</option>
282           <option value="lastname" {if $smarty.request.name_type eq 'lastname'}selected="selected"{/if}>nom</option>
283           <option value="firstname" {if $smarty.request.name_type eq 'firstname'}selected="selected"{/if}>prénom</option>
284           <option value="nickname" {if $smarty.request.name_type eq 'nickname'}selected="selected"{/if}>surnom</option>
285         </select>
286       </td>
287     </tr>
288     <tr>
289       <td>Promotion</td>
290       <td>
291         <script type="text/javascript">/*<![CDATA[*/
292           {literal}
293           function updatepromofields(egal1) {
294             var f = egal1.form;
295             f.egal2.disabled = f.promo2.disabled = egal1.value == '=';
296             f.egal2.readOnly = true;
297             if (f.egal1.value == '>=') {
298               f.egal2.value = '<=';
299             } else {
300               f.egal2.value = '>=';
301             }
302           }
303           $(function() { updatepromofields($('select[name=egal1]')[0]); });
304           {/literal}
305         /*]]>*/</script>
306         <select name="egal1" onchange="updatepromofields(this)" style="text-align:center">
307           <option value="=" {if $smarty.request.egal1 eq "="}selected="selected"{/if}>&nbsp;=&nbsp;</option>
308           <option value="&gt;=" {if $smarty.request.egal1 eq "&gt;="}selected="selected"{/if}>&nbsp;&gt;=&nbsp;</option>
309           <option value="&lt;=" {if $smarty.request.egal1 eq "&lt;="}selected="selected"{/if}>&nbsp;&lt;=&nbsp;</option>
310         </select>
311         <input type="text" name="promo1" size="4" maxlength="4" value="{$smarty.request.promo1}" />
312         &nbsp;et&nbsp;
313         <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" />
314         <input type="text" name="promo2" size="4" maxlength="4" value="{$smarty.request.promo2}" />
315         <select name="edu_type" style="text-align:center">
316           <option value="{#UserFilter::GRADE_ING#}" {if $smarty.request.edu_type eq #UserFilter::GRADE_ING#}selected="selected"{/if}>X</option>
317           <option value="{#UserFilter::GRADE_MST#}" {if $smarty.request.edu_type eq #UserFilter::GRADE_MST#}selected="selected"{/if}>Master</option>
318           <option value="{#UserFilter::GRADE_PHD#}" {if $smarty.request.edu_type eq #UserFilter::GRADE_PHD#}selected="selected"{/if}>Docteur</option>
319         </select>
320       </td>
321     </tr>
322     <tr>
323       <td>Sexe</td>
324       <td>
325         <table>
326           <tr>
327             <td style="width:100px">
328               <input type="radio" name="woman" value="0" {if !$smarty.request.woman}checked="checked"{/if} id="woman0"/><label for="woman0">indifférent</label>
329             </td>
330             <td style="width:100px">
331               <input type="radio" name="woman" value="1" {if $smarty.request.woman eq 1}checked="checked"{/if} id="woman1"/><label for="woman1">homme</label>
332             </td>
333             <td style="width:100px">
334               <input type="radio" name="woman" value="2" {if $smarty.request.woman eq 2}checked="checked"{/if} id="woman2"/><label for="woman2">femme</label>
335             </td>
336           </tr>
337         </table>
338       </td>
339     </tr>
340     <tr>
341       <td>Sur Polytechnique.org</td>
342       <td>
343         <table>
344           <tr>
345             <td style="width:100px">
346               <input type="radio" name="subscriber" value="0" {if !$smarty.request.subscriber}checked="checked"{/if} id="subscriber0"/><label for="subscriber0">indifférent</label>
347             </td>
348             <td style="width:100px">
349               <input type="radio" name="subscriber" value="1" {if $smarty.request.subscriber eq 1}checked="checked"{/if} id="subscriber1"/><label for="subscriber1">inscrit</label>
350             </td>
351             <td style="width:100px">
352               <input type="radio" name="subscriber" value="2" {if $smarty.request.subscriber eq 2}checked="checked"{/if} id="subscriber2"/><label for="subscriber2">non inscrit</label>
353             </td>
354           </tr>
355         </table>
356       </td>
357     </tr>
358     <tr>
359       <td>A une redirection active</td>
360       <td>
361         <table>
362           <tr>
363             <td style="width:100px">
364               <input type="radio" name="has_email_redirect" value="0" {if !$smarty.request.has_email_redirect}checked="checked"{/if}
365                 id="has_email_redirect0" /><label for="has_email_redirect0">indifférent</label>
366             </td>
367             <td style="width:100px">
368               <input type="radio" name="has_email_redirect" value="1" {if $smarty.request.has_email_redirect eq 1}checked="checked"{/if}
369                 id="has_email_redirect1" /><label for="has_email_redirect1">oui</label>
370             </td>
371             <td style="width:100px">
372               <input type="radio" name="has_email_redirect" value="2" {if $smarty.request.has_email_redirect eq 2}checked="checked"{/if}
373                 id="has_email_redirect2" /><label for="has_email_redirect2">non</label>
374             </td>
375           </tr>
376         </table>
377       </td>
378     </tr>
379     <tr>
380       <td>En vie</td>
381       <td>
382         <table>
383           <tr>
384             <td style="width:100px">
385               <input type="radio" name="alive" value="0" {if !$smarty.request.alive}checked="checked"{/if} id="alive0"/><label for="alive0">indifférent</label>
386             </td>
387             <td style="width:100px">
388               <input type="radio" name="alive" value="1" {if $smarty.request.alive eq 1}checked="checked"{/if} id="alive1"/><label for="alive1">vivant</label>
389             </td>
390             <td style="width:100px">
391               <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>
392             </td>
393           </tr>
394         </table>
395       </td>
396     </tr>
397     <tr>
398       <td colspan="2">
399         <input type="checkbox" name="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} id="sdxn" />
400         <label for="sdxn">Étendre par proximité sonore (uniquement sur nom et prénom).</label>
401       </td>
402     </tr>
403     <tr>
404       <th colspan="2">Géographie</th>
405     </tr>
406     <tr>
407       <td>Ville ou code postal</td>
408       <td><input type="text" class="autocomplete" name="city" size="32" value="{$smarty.request.city}" /></td>
409     </tr>
410     <tr>
411       <td>Pays</td>
412       <td>
413         <input name="countryTxt" type="text" class="autocomplete" style="display:none" size="32"
414                value="{$smarty.request.countryTxt}"/>
415         <input name="country" class="autocompleteTarget" type="hidden" value="{$smarty.request.country}"/>
416         <a href="country" class="autocompleteToSelect">{icon name="table" title="Tous les pays"}</a>
417       </td>
418     </tr>
419     <tr id="administrativearea_list">
420       <td>Région, province, état&hellip;</td>
421       <td>
422         <input name="administrativearea" type="hidden" size="32" value="{$smarty.request.administrativearea}" />
423       </td>
424     </tr>
425     <tr id="subadministrativearea_list">
426       <td>Département, comté&hellip;</td>
427       <td>
428         <input name="subadministrativearea" type="hidden" size="32" value="{$smarty.request.subadministrativearea}" />
429       </td>
430     </tr>
431     <tr>
432       <td colspan="2">
433         <label for="only_current">
434           <input name="only_current" id="only_current" type="checkbox"{if $smarty.request.only_current} checked="checked"{/if}/>
435           Chercher uniquement les adresses où les camarades sont actuellement.
436         </label>
437       </td>
438     </tr>
439     <tr>
440       <th colspan="2">Activité</th>
441     </tr>
442     <tr>
443       <td>Entreprise</td>
444       <td><input type="text" class="autocomplete" name="entreprise" size="32" value="{$smarty.request.entreprise}" /></td>
445     </tr>
446     <tr>
447       <td>Description</td>
448       <td><input type="text" class="autocomplete" name="jobdescription" size="32" value="{$smarty.request.jobdescription}" /></td>
449     </tr>
450     <tr>
451       <td>Mots-clefs</td>
452       <td>
453         <input name="jobtermTxt" type="text" class="autocomplete{if $smarty.request.jobterm} hidden_valid{/if}" style="display:none" size="32"
454                value="{$smarty.request.jobtermTxt}"/>
455         <input name="jobterm" class="autocompleteTarget" type="hidden" value="{$smarty.request.jobterm}"/>
456         <a href="jobterm" class="autocompleteToSelect">{icon name="table" title="Tous les mots-clefs"}</a>
457       </td>
458     </tr>
459     {if hasPerm('directory_private')}
460     <tr>
461       <td>CV contient</td>
462       <td><input type="text" name="cv" size="32" value="{$smarty.request.cv}" /></td>
463     </tr>
464     {/if}
465     <tr>
466       <td colspan="2">
467         <input type='checkbox' name='only_referent' {if $smarty.request.only_referent}checked='checked'{/if} id="only_referent"/>
468         <label for="only_referent">Chercher uniquement parmi les camarades se proposant comme référents.</label>
469       </td>
470     </tr>
471     <tr>
472       <th colspan="2">Divers</th>
473     </tr>
474     <tr>
475       <td>Nationalité</td>
476       <td>
477         <input name="nationaliteTxt" type="text" class="autocomplete" style="display:none" size="32"
478                value="{$smarty.request.nationaliteTxt}"/>
479         <input name="nationalite" class="autocompleteTarget" type="hidden" value="{$smarty.request.nationalite}"/>
480         <a href="nationalite" class="autocompleteToSelect">{icon name="table" title="Toutes les nationalités"}</a>
481       </td>
482     </tr>
483     {if hasPerm('directory_private')}
484     <tr>
485       <td>Binet</td>
486       <td>
487         <input name="binetTxt" type="text" class="autocomplete" style="display:none" size="32"
488                value="{$smarty.request.binetTxt}"/>
489         <input name="binet" class="autocompleteTarget" type="hidden" value="{$smarty.request.binet}"/>
490         <a href="binet" class="autocompleteToSelect">{icon name="table" title="Tous les binets"}</a>
491       </td>
492     </tr>
493     {/if}
494     <tr>
495       <td>Groupe X</td>
496       <td>
497         <input name="groupexTxt" type="text" class="autocomplete" style="display:none" size="32"
498                value="{$smarty.request.groupexTxt}"/>
499         <input name="groupex" class="autocompleteTarget" type="hidden" value="{$smarty.request.groupex}"/>
500         <a href="groupex" class="autocompleteToSelect">{icon name="table" title="Tous les groupes X"}</a>
501       </td>
502     </tr>
503     {if hasPerm('directory_private')}
504     <tr>
505       <td>Section</td>
506       <td>
507         <input name="sectionTxt" type="text" class="autocomplete" style="display:none" size="32"
508                value="{$smarty.request.sectionTxt}"/>
509         <input name="section" class="autocompleteTarget" type="hidden" value="{$smarty.request.section}"/>
510         <a href="section" class="autocompleteToSelect">{icon name="table" title="Toutes les sections"}</a>
511       </td>
512     </tr>
513     {/if}
514     <tr>
515       <td>Formation</td>
516       <td>
517         <input name="schoolTxt" type="text" class="autocomplete" style="display:none" size="32"
518                value="{$smarty.request.schoolTxt}"/>
519         <input name="school" class="autocompleteTarget" type="hidden" value="{$smarty.request.school}"/>
520         <a href="school" class="autocompleteToSelect">{icon name="table" title="Toutes les formations"}</a>
521       </td>
522     </tr>
523     <tr>
524       <td>Diplôme</td>
525       <td>
526         <input name="diploma" size="32" value="{$smarty.request.diploma}"/>
527       </td>
528     </tr>
529     <tr>
530       <td>Corps d'origine</td>
531       <td>
532         <select name="origin_corps">
533         {foreach from=$origin_corps_list key=id item=corps}
534           <option value="{$id}" {if $smarty.request.origin_corps eq $id}selected="selected"{/if}>{$corps}</option>
535         {/foreach}
536         </select>
537       </td>
538     </tr>
539     <tr>
540       <td>Corps actuel</td>
541       <td>
542         <select name="current_corps">
543         {foreach from=$current_corps_list key=id item=corps}
544           <option value="{$id}" {if $smarty.request.current_corps eq $id}selected="selected"{/if}>{$corps}</option>
545         {/foreach}
546         </select>
547       </td>
548     </tr>
549     <tr>
550       <td>Grade</td>
551       <td>
552         <select name="corps_rank">
553         {foreach from=$corps_rank_list key=id item=corps}
554           <option value="{$id}" {if $smarty.request.corps_rank eq $id}selected="selected"{/if}>{$corps}</option>
555         {/foreach}
556         </select>
557       </td>
558     </tr>
559     <tr>
560       <td>Commentaire contient</td>
561       <td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
562     </tr>
563     <tr>
564       <td>Numéro de téléphone</td>
565       <td><input type="text" name="phone_number" size="32" value="{$smarty.request.phone_number}"/></td>
566     </tr>
567     <tr>
568       <td style="vertical-align: middle">
569         <span>Networking et sites webs</span>
570       </td>
571       <td>
572         <table>
573           <tr>
574             <td style="padding-left: 0px;">
575               <input type="text" name="networking_address" size="32" value="{$smarty.request.networking_address}" />
576             </td>
577             <td>
578               <select name="networking_type">
579               {foreach from=$networking_types key=id item=network}
580                 <option value="{$id}" {if $smarty.request.networking_type eq $id}selected="selected"{/if}>{$network}</option>
581               {/foreach}
582               </select>
583             </td>
584           </tr>
585         </table>
586       </td>
587     </tr>
588         {if hasPerm('admin,edit_directory')}
589     <tr>
590       <td>Matricule AX</td>
591       <td>
592         <textarea name="schoolid_ax" rows="10" cols="12">{$smarty.request.schoolid_ax}</textarea>
593         <br />
594         <i>Entrer une liste de matricules AX (un par ligne)</i>
595       </td>
596         {/if}
597         {if $smarty.session.auth ge AUTH_COOKIE}
598     </tr>
599     <tr>
600       <td colspan="2">
601           <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} id="order"/>
602           <label for="order">Mettre les fiches modifiées récemment en premier.</label>
603       </td>
604     </tr>
605     <tr>
606       <td colspan="2">
607            <input type='checkbox' name='exact' id="exact" {if $smarty.request.exact}checked='checked'{/if} value='1'/>
608            <label for="exact">Faire une recherche exacte.</label>
609       </td>
610     </tr>
611         {/if}
612     <tr><td colspan="2"></td></tr>
613     <tr>
614       <td colspan="2" style="text-align: center">
615           <input type="submit" value="Chercher" />
616       </td>
617     </tr>
618   </table>
619 </form>
620
621 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}