{* *}
{**************************************************************************}
-<h1>Recherche avancée</h1>
+<h1>Recherche dans l'annuaire</h1>
-<p>[<a href="{rel}/search">Recherche simple</a>]</p>
-
-<form id="recherche" action="{rel}/search/adv" method="get">
+<form id="recherche" action="search/adv" method="get">
+ <script type="text/javascript">{literal}
+ function launch_form(url) {
+ var f = document.getElementById('recherche');
+ f.action = url;
+ f.submit();
+ }
+ {/literal}</script>
<table class="bicol" cellpadding="3" summary="Recherche">
<tr>
+ <th colspan="2">
+ Recherche avancée [<a href="search"><<< Recherche simple</a>]
+ </th>
+ </tr>
+ <tr>
<td>Nom</td>
<td>
<input type="hidden" name="rechercher" value="Chercher"/>
<input type="submit" style="display:none"/>
<input type="text" name="name" size="32" value="{$smarty.request.name}" />
{if $smarty.request.name && !$with_soundex && $smarty.request.recherche}
- <a class='smaller' href="{$smarty.server.PHP_SELF}?with_soundex=1&{$url_args}">
+ <a class='smaller' href="search/adv?with_soundex=1&{$url_args}">
étendre par proximité sonore
</a>
{/if}
<td>
<input type="text" name="firstname" size="32" value="{$smarty.request.firstname}" />
{if $smarty.request.firstname && !$with_soundex && $smarty.request.recherche}
- <a class='smaller' href="{$smarty.server.PHP_SELF}?with_soundex=1&{$url_args}">
+ <a class='smaller' href="search/adv?with_soundex=1&{$url_args}">
étendre par proximité sonore
</a>
{/if}
<tr>
<td>Pays</td>
<td>
- <select name="country" onchange="javascript:document.forms.recherche.submit();">
+ <select name="country" onchange="return Ajax.update_html('region', '{$platal->ns}search/ajax/region/' + this.value);">
{if $smarty.request.country}
{assign var="country" value=$smarty.request.country}
{else}
</tr>
<tr>
<td>Région ou département</td>
- <td>
- <select name="region">
+ <td id="region">
{if $smarty.request.region}
{assign var="region" value=$smarty.request.region}
{else}
{assign var="region" value=""}
{/if}
- {if $smarty.request.country neq ""}
- {geoloc_region country=$smarty.request.country region=$region}
- {else}
- <option value=""></option>
- {/if}
- </select>
+ {include file="search/adv.region.form.tpl" country=$smarty.request.country}
</td>
</tr>
<tr>
<tr>
<td>Formation</td>
<td>
- <select name="school" onchange="javascript:document.forms.recherche.submit();">
+ <select name="school" onchange="return Ajax.update_html('grade', '{$platal->ns}search/ajax/grade/' + this.value);">
<option value="0"></option>
{iterate item=cs from=$choix_schools}
<option value="{$cs.id}" {if $smarty.request.school eq $cs.id}selected="selected"{/if}>
</tr>
<tr>
<td></td>
- <td>
- <select name="diploma">
- <option value="0"></option>
- {section name=diploma loop=$choix_diplomas}
- <option value="{$choix_diplomas[diploma]}" {if $smarty.request.diploma eq
- $choix_diplomas[diploma]}selected="selected"{/if}>
- {$choix_diplomas[diploma]}
- </option>
- {/section}
- </select>
+ <td id="grade">
+ {include file="search/adv.grade.form.tpl" grade=$smarty.request.diploma}
</td>
</tr>
<tr>
<td>Commentaire contient</td>
<td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
</tr>
+ <tr>
+ <td colspan="2" style="padding-top: 1.5em">
+ <div style="float: right">
+ <input type="button" value="Chercher" onclick="launch_form('search/adv')"/>
+ </div>
+ {if $smarty.session.auth ge AUTH_COOKIE}
+ <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} />
+ mettre les fiches modifiées récemment en premier
+ {/if}
+ </td>
+ </tr>
</table>
- {min_auth level='cookie'}
- <p>
- <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} />
- mettre les fiches modifiées récemment en premier
- </p>
- {/min_auth}
</form>
- <p class="center">
- <script type="text/javascript">{literal}
- function launch_form(url) {
- var f = document.getElementById('recherche');
- f.action = url;
- f.submit();
- }
- {/literal}</script>
- {if $use_map}
- <input type="button" value="Voir les résultats sur une carte" onclick="launch_form('geoloc/')"/>
- {/if}
- <input type="button" value="Chercher" onclick="launch_form('{$smarty.server.PHP_SELF}')"/>
- </p>
+<p class="center">
+ <input type="button" value="Voir les résultats sur une carte" onclick="launch_form('geoloc/')"/>
+</p>
<p>
<strong>N.B.</strong> Le caractère joker * peut remplacer une ou plusieurs lettres dans les recherches.
</p>