Javascript cleanup again.
[platal.git] / templates / search / quick.form.tpl
index d36d55f..228ba81 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2009 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 <h1>Recherche dans l'annuaire</h1>
 
 <form action="search" method="get"{if $show_js} id="quick_form"{/if}>
-  <table class="bicol" cellspacing="0" cellpadding="4">
-    {if $smarty.session.auth ge AUTH_COOKIE}
-    <tr>
-      <th colspan="2">
-        Recherche simple <span class="noprint">[<a href="search/adv">&gt;&gt;&gt;&nbsp;Recherche&nbsp;avancée</a>]</span>
-      </th>
-    </tr>
-    <tr>
-      <td colspan="2">
-        <input type='text' name="quick" value="{$smarty.request.quick}" style="width: 98%" /><br />
-      </td>
-    </tr>
-    <tr class="noprint">
-      <td style="width: 78%">
-        <input type="checkbox" name="with_soundex" id="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} /> <label for="with_soundex">Activer la recherche par proximité sonore.</label>
-        <br /><input type='checkbox' name='order' id="order" value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} /> <label for="order">Mettre les fiches modifiées récemment en premier.</label>
-        <br /><input type='checkbox' name='nonins' id="nonins" {if $smarty.request.nonins}checked='checked'{/if} value='1' /> <label for="nonins">Chercher uniquement des non inscrits.</label>
-      </td>
-    {else}
+  {if $smarty.session.auth ge AUTH_COOKIE}
+  <fieldset>
+    <legend>{icon name=magnifier} Recherche simple</legend>
+
+    <table style="width: 100%">
+      <tr>
+        <td colspan="2">
+          <input type='text' name="quick" value="{$smarty.request.quick}" style="width: 98%" /><br />
+        </td>
+      </tr>
+      <tr class="noprint">
+        <td style="width: 70%">
+          <input type="checkbox" name="with_soundex" id="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} /> <label for="with_soundex">Activer la recherche par proximité sonore.</label>
+          <br /><input type='checkbox' name='order' id="order" value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} /> <label for="order">Mettre les fiches modifiées récemment en premier.</label>
+          <br /><input type='checkbox' name='nonins' id="nonins" {if $smarty.request.nonins}checked='checked'{/if} value='1' /> <label for="nonins">Chercher uniquement des non inscrits.</label>
+        </td>
+        <td class="right">
+          <br /><input type="submit" value="Chercher" />
+        </td>
+      </tr>
+    </table>
+    <hr />
+    <div class="center">
+      <a href="search/adv">Effectuer une recherche avancée</a>
+    </div>
+  </fieldset>
+  {else}
+  <table style="width: 100%">
     <tr class="noprint">
-      <td style="width: 78%">
+      <td style="width: 60%">
         <input type='text' name="quick" value="{$smarty.request.quick}" style="width: 98%" /><br />
       </td>
-    {/if}
-      <td class="right" style="vertical-align: middle">
+      <td class="right">
         <input type="submit" value="Chercher" />
       </td>
     </tr>
   </table>
+  {/if}
 </form>
 
-<br />
-
 {if $show_js}
 {literal}
 <script type="text/javascript">
-  <!--
-  // Activate the first search input field.
-  document.getElementById("quick_form").quick.focus();
-  // -->
+  $(document).ready(function() {
+    $("#quick_form input[name='quick']").focus();
+  });
 </script>
 {/literal}
 {/if}