geoloc: validation html et ajout d'un lien de menu
authorx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 4 Jun 2006 07:56:36 +0000 (07:56 +0000)
committerx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 4 Jun 2006 07:56:36 +0000 (07:56 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@285 839d8a87-29fc-0310-9880-83ba4fa771e5

hooks/tmp.inc.php
htdocs/geoloc/index.php
templates/geoloc/index.tpl
templates/search.adv.form.tpl

index f1d6425..f0d1b57 100644 (file)
@@ -12,6 +12,7 @@ function tmp_menu()
 
     $globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Trombi/Site promo',          'trombipromo.php');
     $globals->menu->addPrivateEntry(XOM_GROUPS,   20, 'Conseil Pro.',          'referent.php');
+    $globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Planisphère',          'geoloc/');
     $globals->menu->addPrivateEntry(XOM_GROUPS,   30, 'Groupes X',             'http://www.polytechnique.net/plan.php');
 
     $globals->menu->addPrivateEntry(XOM_INFOS,    10, 'Documentations',        'Docs/');
index 5b3d7b5..5af6ecb 100644 (file)
@@ -27,7 +27,7 @@ $page->assign('localises', $res->fetchOneCell());
 
        require_once('search.inc.php');
 $fields = new SFieldGroup(true, advancedSearchFromInput());
-$search = $fields->get_url().'&amp;';
+$search = $fields->get_url();
 if (Env::has('only_current') && Env::get('only_current') != 'on') $search .= '&only_current=';
 $search = preg_replace('/(^|&amp;)mapid=([0-9]+)(&amp;|$)/','\1\3', $search);
 if ($search)
index 0bc0b80..871f393 100644 (file)
@@ -32,7 +32,7 @@ function clickOnCity(id)
 {
        var f = document.getElementById('search_form');
        var url = f.action;
-       f.action += '&cityid=' + id; 
+       f.action += unescape('%26')+'cityid=' + id; 
        f.submit();
        f.action = url;
        document.getElementById('search_results').style.height = '250px';
@@ -45,7 +45,7 @@ function goToCountry(id)
 function searchMapId(f)
 {
        var url = f.action;
-       f.action += '&mapid=' + mapid; 
+       f.action += unescape('%26')+'mapid=' + mapid; 
        f.submit();
        f.action = url;
        document.getElementById('search_results').style.height = '250px';
index 2bfff6d..dd4a263 100644 (file)
@@ -29,6 +29,7 @@
     <tr>
       <td>Nom</td>
       <td>
+       <input type="submit" name="rechercher" style="display:none" value="Chercher"/>
         <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&amp;{$url_args}">
                mettre les fiches modifiées récemment en premier
        </p>
        {/min_auth}
-       <input type="hidden" name="rechercher" value="Chercher"/>
-       <input type="submit" style="display:none" value="Chercher" onClick="launch_form('{$smarty.server.PHP_SELF}')"/>
 </form>
        <p class="center">
                <script type="text/javascript">{literal}
                        f.submit();
                }
                {/literal}</script>
-               <input type="button" value="Voir les résultats sur une carte" onClick="launch_form('geoloc/')"/>
-               <input type="button" value="Chercher" onClick="launch_form('{$smarty.server.PHP_SELF}')"/>
+               <input type="button" value="Voir les résultats sur une carte" onclick="launch_form('geoloc/')"/>
+               <input type="button" value="Chercher" onclick="launch_form('{$smarty.server.PHP_SELF}')"/>
   </p>
 <p>
   <strong>N.B.</strong> Le caractère joker * peut remplacer une ou plusieurs lettres dans les recherches.