Factorises promo selection.
[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>Pays</td>
427       <td>
428         <input name="countryTxt" type="text" class="autocomplete" style="display:none" size="32"
429                value="{$smarty.request.countryTxt}"/>
430         <input name="country" class="autocompleteTarget" type="hidden" value="{$smarty.request.country}"/>
431         <a href="country" class="autocompleteToSelect">{icon name="table" title="Tous les pays"}</a>
432       </td>
433     </tr>
434     <tr id="administrative_area_level_1_list">
435       <td>Région, province, état&hellip;</td>
436       <td>
437         <input name="administrative_area_level_1" type="hidden" size="32" value="{$smarty.request.administrative_area_level_1}" />
438       </td>
439     </tr>
440     <tr id="administrative_area_level_2_list">
441       <td>Département, comté&hellip;</td>
442       <td>
443         <input name="administrative_area_level_2" type="hidden" size="32" value="{$smarty.request.administrative_area_level_2}" />
444       </td>
445     </tr>
446     <tr id="administrative_area_level_3_list">
447       <td>Canton&hellip;</td>
448       <td>
449         <input name="administrative_area_level_3" type="hidden" size="32" value="{$smarty.request.administrative_area_level_3}" />
450       </td>
451     </tr>
452     <tr id="locality_text">
453       <td>Ville</td>
454       <td><input type="text" class="autocomplete" name="localityTxt" size="32" value="{$smarty.request.localityTxt}" /></td>
455     </tr>
456     <tr id="locality_list">
457       <td>Ville</td>
458       <td>
459         <input name="locality" type="hidden" size="32" value="{$smarty.request.locality}" />
460       </td>
461     </tr>
462     <tr id="sublocality_list">
463       <td>Arrondissement, quartier&hellip;</td>
464       <td>
465         <input name="sublocality" type="hidden" size="32" value="{$smarty.request.sublocality}" />
466       </td>
467     </tr>
468     <tr>
469       <td colspan="2">
470         <label for="only_current">
471           <input name="only_current" id="only_current" type="checkbox"{if $smarty.request.only_current} checked="checked"{/if}/>
472           Chercher uniquement les adresses où les camarades sont actuellement.
473         </label>
474       </td>
475     </tr>
476     <tr>
477       <th colspan="2">Activité</th>
478     </tr>
479     <tr>
480       <td>Entreprise</td>
481       <td><input type="text" class="autocomplete" name="entreprise" size="32" value="{$smarty.request.entreprise}" /></td>
482     </tr>
483     <tr>
484       <td>Description</td>
485       <td><input type="text" class="autocomplete" name="jobdescription" size="32" value="{$smarty.request.jobdescription}" /></td>
486     </tr>
487     <tr>
488       <td>Mots-clefs</td>
489       <td>
490         <input name="jobtermTxt" type="text" class="autocomplete{if $smarty.request.jobterm} hidden_valid{/if}" style="display:none" size="32"
491                value="{$smarty.request.jobtermTxt}"/>
492         <input name="jobterm" class="autocompleteTarget" type="hidden" value="{$smarty.request.jobterm}"/>
493         <a href="jobterm" class="autocompleteToSelect">{icon name="table" title="Tous les mots-clefs"}</a>
494       </td>
495     </tr>
496     {if hasPerm('directory_private')}
497     <tr>
498       <td>CV contient</td>
499       <td><input type="text" name="cv" size="32" value="{$smarty.request.cv}" /></td>
500     </tr>
501     {/if}
502     <tr>
503       <td colspan="2">
504         <input type='checkbox' name='only_referent' {if $smarty.request.only_referent}checked='checked'{/if} id="only_referent"/>
505         <label for="only_referent">Chercher uniquement parmi les camarades se proposant comme référents.</label>
506       </td>
507     </tr>
508     <tr>
509       <th colspan="2">Divers</th>
510     </tr>
511     <tr>
512       <td>Nationalité</td>
513       <td>
514         <input name="nationaliteTxt" type="text" class="autocomplete" style="display:none" size="32"
515                value="{$smarty.request.nationaliteTxt}"/>
516         <input name="nationalite" class="autocompleteTarget" type="hidden" value="{$smarty.request.nationalite}"/>
517         <a href="nationalite" class="autocompleteToSelect">{icon name="table" title="Toutes les nationalités"}</a>
518       </td>
519     </tr>
520     {if hasPerm('directory_private')}
521     <tr>
522       <td>Binet</td>
523       <td>
524         <input name="binetTxt" type="text" class="autocomplete" style="display:none" size="32"
525                value="{$smarty.request.binetTxt}"/>
526         <input name="binet" class="autocompleteTarget" type="hidden" value="{$smarty.request.binet}"/>
527         <a href="binet" class="autocompleteToSelect">{icon name="table" title="Tous les binets"}</a>
528       </td>
529     </tr>
530     {/if}
531     <tr>
532       <td>Groupe X</td>
533       <td>
534         <input name="groupexTxt" type="text" class="autocomplete" style="display:none" size="32"
535                value="{$smarty.request.groupexTxt}"/>
536         <input name="groupex" class="autocompleteTarget" type="hidden" value="{$smarty.request.groupex}"/>
537         <a href="groupex" class="autocompleteToSelect">{icon name="table" title="Tous les groupes X"}</a>
538       </td>
539     </tr>
540     {if hasPerm('directory_private')}
541     <tr>
542       <td>Section</td>
543       <td>
544         <input name="sectionTxt" type="text" class="autocomplete" style="display:none" size="32"
545                value="{$smarty.request.sectionTxt}"/>
546         <input name="section" class="autocompleteTarget" type="hidden" value="{$smarty.request.section}"/>
547         <a href="section" class="autocompleteToSelect">{icon name="table" title="Toutes les sections"}</a>
548       </td>
549     </tr>
550     {/if}
551     <tr>
552       <td>Formation</td>
553       <td>
554         <input name="schoolTxt" type="text" class="autocomplete" style="display:none" size="32"
555                value="{$smarty.request.schoolTxt}"/>
556         <input name="school" class="autocompleteTarget" type="hidden" value="{$smarty.request.school}"/>
557         <a href="school" class="autocompleteToSelect">{icon name="table" title="Toutes les formations"}</a>
558       </td>
559     </tr>
560     <tr>
561       <td>Diplôme</td>
562       <td>
563         <input name="diploma" size="32" value="{$smarty.request.diploma}"/>
564       </td>
565     </tr>
566     <tr>
567       <td>Corps d'origine</td>
568       <td>
569         <select name="origin_corps">
570         {foreach from=$origin_corps_list key=id item=corps}
571           <option value="{$id}" {if $smarty.request.origin_corps eq $id}selected="selected"{/if}>{$corps}</option>
572         {/foreach}
573         </select>
574       </td>
575     </tr>
576     <tr>
577       <td>Corps actuel</td>
578       <td>
579         <select name="current_corps">
580         {foreach from=$current_corps_list key=id item=corps}
581           <option value="{$id}" {if $smarty.request.current_corps eq $id}selected="selected"{/if}>{$corps}</option>
582         {/foreach}
583         </select>
584       </td>
585     </tr>
586     <tr>
587       <td>Grade</td>
588       <td>
589         <select name="corps_rank">
590         {foreach from=$corps_rank_list key=id item=corps}
591           <option value="{$id}" {if $smarty.request.corps_rank eq $id}selected="selected"{/if}>{$corps}</option>
592         {/foreach}
593         </select>
594       </td>
595     </tr>
596     <tr>
597       <td>Commentaire contient</td>
598       <td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
599     </tr>
600     <tr>
601       <td>Numéro de téléphone</td>
602       <td><input type="text" name="phone_number" size="32" value="{$smarty.request.phone_number}"/></td>
603     </tr>
604     <tr>
605       <td style="vertical-align: middle">
606         <span>Networking et sites webs</span>
607       </td>
608       <td>
609         <table>
610           <tr>
611             <td style="padding-left: 0px;">
612               <input type="text" name="networking_address" size="32" value="{$smarty.request.networking_address}" />
613             </td>
614             <td>
615               <select name="networking_type">
616               {foreach from=$networking_types key=id item=network}
617                 <option value="{$id}" {if $smarty.request.networking_type eq $id}selected="selected"{/if}>{$network}</option>
618               {/foreach}
619               </select>
620             </td>
621           </tr>
622         </table>
623       </td>
624     </tr>
625         {if hasPerm('admin,edit_directory')}
626     <tr>
627       <td>Matricule AX</td>
628       <td>
629         <textarea name="schoolid_ax" rows="10" cols="12">{$smarty.request.schoolid_ax}</textarea>
630         <br />
631         <i>Entrer une liste de matricules AX (un par ligne)</i>
632       </td>
633         {/if}
634         {if $smarty.session.auth ge AUTH_COOKIE}
635     </tr>
636     <tr>
637       <td colspan="2">
638           <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} id="order"/>
639           <label for="order">Mettre les fiches modifiées récemment en premier.</label>
640       </td>
641     </tr>
642     <tr>
643       <td colspan="2">
644            <input type='checkbox' name='exact' id="exact" {if $smarty.request.exact}checked='checked'{/if} value='1'/>
645            <label for="exact">Faire une recherche exacte.</label>
646       </td>
647     </tr>
648         {/if}
649     <tr><td colspan="2"></td></tr>
650     <tr>
651       <td colspan="2" style="text-align: center">
652           <input type="submit" value="Chercher" />
653       </td>
654     </tr>
655   </table>
656 </form>
657
658 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}