Minor Fixes for jQuery 1.3.2 Upgrade
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / advsearch.tmpl
index b536f59..d5fb462 100644 (file)
@@ -1,5 +1,5 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha &rsaquo; Catalogue &rsaquo; Advanced Search</title>
+<title>Koha &rsaquo; Catalog &rsaquo; Advanced Search</title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/JavaScript" language="JavaScript">
        /**
@@ -7,17 +7,21 @@
         *  This function allows to display a new field to search.
         */
        function add_field() {
-           var ButtonPlus = document.getElementById('ButtonPlus');
+           var ButtonPlus = document.getElementById("ButtonPlus");
                var line = ButtonPlus.parentNode;
                var dad  = line.parentNode;
                dad.appendChild(line.cloneNode(true));
                line.removeChild(ButtonPlus);
        }
+       $(document).ready(function() {
+               $("input[name=q]:eq(0)").focus();
+       });
 </script>
 </head>
 <body>
 
 <!-- TMPL_INCLUDE NAME="header.inc" -->
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Advanced Search</div>
 
 <div id="doc" class="yui-t7">
    <div id="bd">
@@ -32,8 +36,7 @@
 <fieldset>
         <legend>Select local databases</legend>
                 <!-- TMPL_LOOP NAME="local_servers_loop" -->
-                <input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" <!-- TMPL_IF NAME="checked" -->checked="<!-- TMPL_VAR NAME="checked" -->"<!-- /TMPL_IF --> value="<!-- TMPL_VAR NAME="value" -->" /><label for="<!-- TMPL_VAR NAME="id" -->"><img width="16" height="16" alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/img/<!-- TMPL_VAR NAME="icon" -->" /> <!-- TMPL_VAR NAME="label" --></label>
-                <!-- /TMPL_LOOP -->
+<!-- TMPL_IF NAME="checked" --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" checked="checked" value="<!-- TMPL_VAR NAME="value" -->" /><!-- TMPL_ELSE --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" /><!-- /TMPL_IF --><label for="<!-- TMPL_VAR NAME="id" -->"><img width="16" height="16" alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/img/<!-- TMPL_VAR NAME="icon" -->" /> <!-- TMPL_VAR NAME="label" --></label><!-- /TMPL_LOOP -->
 </fieldset>
 <!-- /DATABASES -->
 <!-- /TMPL_IF -->
@@ -43,7 +46,8 @@
 <fieldset>
     <legend>Select remote databases:</legend>
                 <!-- TMPL_LOOP NAME="outer_servers_loop" -->
-                <input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" <!-- TMPL_IF NAME="checked" -->checked="<!-- TMPL_VAR NAME="checked" -->"<!-- /TMPL_IF --> value="<!-- TMPL_VAR NAME="value" -->" /><label for="<!-- TMPL_VAR NAME="id" -->"><img alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="icon" -->" /><!-- TMPL_VAR NAME="label" --></label>
+                <!-- TMPL_IF NAME="checked" --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" checked="checked" value="<!-- TMPL_VAR NAME="value" -->" /><!-- TMPL_ELSE --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" /><!-- /TMPL_IF -->
+<label for="<!-- TMPL_VAR NAME="id" -->"><img alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="icon" -->" /><!-- TMPL_VAR NAME="label" --></label>
                 <!-- /TMPL_LOOP -->
     </fieldset>
 <!-- /REMOTE DATABASES -->
     <fieldset>
     <legend>Search For: </legend>
     <!-- TMPL_LOOP NAME="search_boxes_loop" -->
-        <div>
+        <!-- TMPL_IF NAME="search_boxes_label" --><div style="text-indent: 4.5em;"><!-- TMPL_ELSE --><div><!-- /TMPL_IF -->
                        <!-- TMPL_IF NAME="expanded_options" -->
             <!-- TMPL_IF NAME="boolean" -->
                 <select name="op">
-                    <option value="" selected="selected">and</option>
+                    <option value="and" selected="selected">and</option>
                     <option value="or">or</option>
                     <option value="not">not</option>
                 </select>
             <!-- /TMPL_IF --> 
                        <!-- /TMPL_IF -->
-            <select name="idx">
-                <option value="" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Keyword</option>
-                <option value="au,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Author</option>
-                <option value="au,phr" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Author Phrase</option>
-                <option value="cpn,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Corporate Name</option>
-                <option value="cfn,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Conference Name</option>
-                <option value="cpn,phr" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Corporate Name Phrase</option>
-                <option value="cfn,phr" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Conference Name Phrase</option>
-                <option value="pn,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Personal Name</option>
-                <option value="pn,phr" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Personal Name Phrase</option>
-                <option value="ln" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Language</option>
-                <option value="nt,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Notes/Comments</option>
-                <option value="pb,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Publisher</option>
-                <option value="pl,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Publisher Location</option>
-                <option value="yr" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Publication Date</option>
-                <option value="sn" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Standard Number</option>
-                <option value="nb" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
-                <option value="ns" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
-                <option value="lcn" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Call Number</option>
-                <option value="su,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Subject</option>
-                <option value="su,phr" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Subject Phrase</option>
-                <option value="ti,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Title</option>
-                <option value="ti,phr" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Title Phrase</option>
-                <option value="se,wrdl" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>&nbsp;&nbsp;&nbsp;&nbsp; Series Title</option>
-                <option value="bc" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->>Barcode</option>
-            </select>
-            <input id="search_box" type="text" size="30" name="q" title="Enter search terms" value="" class="focus" />
-
+                       <!-- TMPL_INCLUDE NAME="search_indexes.inc" -->
+                       <input type="text" size="30" name="q" title="Enter search terms" value="" />
             <!-- TMPL_IF NAME="expanded_options" -->
                 <!-- TMPL_IF NAME="add_field" -->
                     <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
 <!-- ITEMTYPE LIMITS -->
     <div id="itemtypelist">
        <fieldset>
-     <legend>Limit type to: match any of the following:</legend>
+     <legend>Limit to any of the following:</legend>
     <table>
         <tr>
       <!--TMPL_LOOP Name="itemtypeloop"-->
         <td>
         <!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
-               <input type="checkbox" id="mt-<!--TMPL_VAR Name="number" -->" name="limit" value="mt:<!--TMPL_VAR Name="code" -->" />&nbsp;
-        <!--TMPL_VAR Name="description" --></td>
+               <input type="checkbox" id="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->" name="limit" value="mc-<!-- TMPL_VAR NAME="ccl" -->:<!--TMPL_VAR Name="code" -->" />&nbsp;
+        <label for="<!-- TMPL_VAR NAME="ccl" -->-<!--TMPL_VAR Name="number" -->"><!--TMPL_VAR Name="description" --></label></td>
         <!-- TMPL_UNLESS name="count5" --></tr><tr><!-- /TMPL_UNLESS -->
       <!--/TMPL_LOOP-->
+         <!-- FIXME: for validation, avoid generating empty row -->
       </tr>
     </table>
        </fieldset>
 <!-- LANGUAGE LIMIT -->
                <p><label for="language-limit">Language: </label>                                        
                <select name="limit">
+               <option value="">No Limit</option>
                <!-- TMPL_LOOP NAME="search_languages_loop" -->
-               <option value="<!-- TMPL_VAR NAME="language_code" -->" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR NAME="selected" -->"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="language_name" --> <!-- TMPL_IF NAME="language_locale_name" -->(<!-- TMPL_VAR NAME="language_locale_name" -->)<!-- /TMPL_IF --></option>
+               <!-- TMPL_IF NAME="selected" -->
+               <option value="ln:<!-- TMPL_VAR NAME="iso639_2_code" -->" selected="selected"><!-- TMPL_VAR NAME="language_description" --></option>
+               <!-- TMPL_ELSE -->
+               <option value="ln:<!-- TMPL_VAR NAME="iso639_2_code" -->"><!-- TMPL_VAR NAME="language_description" --></option>
+               <!-- /TMPL_IF -->
+               
                <!-- /TMPL_LOOP -->
                </select></p><!-- <a href="">Show all languages</a>-->
 <!-- /LANGUAGE LIMIT -->
 <!-- /BASIC LIMITS -->
 <!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="template-defined-limits" -->
-<!-- TYPE LIMITS -->
-    <fieldset>
-
-    <legend>Limit type to: match any of the following</legend>
-    <table class="itemtypes">
-            <tr>
-            <td><input type="checkbox" id="mc-bks" name="limit" value="mc:t" />
-                       <label for="mc-bks" title="Books, Pamphlets, Technical reports, Manuscripts, Legal papers, Theses and dissertations">
-                       <img border="0" src="/intranet-tmpl/prog/img/AF.gif" alt="Books" />Books</label></td>
-                       <td><input type="checkbox" id="mc-vis" name="limit" value="mc:v" />
-                       <label for="mc-vis" title="Motion pictures, Videorecordings, Filmstrips, Slides, Transparencies, Photos, Cards, Charts, Drawings">
-                       <img border="0" src="/intranet-tmpl/prog/en/images/AV Aids.gif" alt="Visual Materials" />Visual Materials</label></td>
-            <td><input type="checkbox" id="mc-sr" name="limit" value="mc-rtype:i" />
-                       <label for="mc-sr" title="Spoken, Books on CD and Cassette">
-                       <img border="0" src="/intranet-tmpl/prog/en/images/AF.gif" alt="Books on Tape" />Books on Tape</label></td>
-            </tr>
-
-            <tr>
-            <td><input type="checkbox" id="mc-cf" name="limit" value="mc:c" />
-                       <label for="mc-cf" title="Computer files, Data, Software">
-                       <img border="0" src="/intranet-tmpl/prog/en/images/CD-ROM software.gif" alt="Computer Files" />Computer Files</label></td>
-            <td><input type="checkbox" id="mc-lh" name="limit" value="mc-collection:LH" />
-                       <label for="mc-lh" title="Local History Materials">
-                       <img border="0" src="/intranet-tmpl/prog/en/images/Local history.gif" alt="Local History Materials" />Local History Materials</label></td>
-            <td><input type="checkbox" id="mc-map" name="limit" value="mc:a" />
-                       <label for="mc-map" title="Maps, Globes">
-                       <img border="0" src="/intranet-tmpl/prog/en/images/PF.gif " alt="Maps" />Maps</label></td>
-            </tr>
-
-            <tr>
-            <td><input type="checkbox" id="mc-mus" name="limit" value="mc-rtype:j" />
-                       <label for="mc-mus" title="Music">
-                       <img border="0" src="/intranet-tmpl/prog/en/images/CDM.gif" alt="Music" />Music</label></td>
-            <td><input type="checkbox" id="mc-kit" name="limit" value="mc-rtype:o" />
-                       <label for="mc-kit" title="Kits"><img border="0" src="/intranet-tmpl/prog/en/images/KIT.gif" alt="Kits" />Kits</label></td>
-            <td><input type="checkbox" id="mc-ref" name="limit" value="mc-collection:REF" />
-                       <label for="mc-ref" title="Reference">
-                       <img border="0" src="/intranet-tmpl/prog/en/images/REF.gif" alt="Reference" />Reference</label></td>
-            </tr>
-            
-            </table>
-</fieldset>
-<!-- /TMPL_IF -->
-<!-- /TYPE LIMITS -->
-
 
-</div>
-</div>
 <!-- TMPL_IF NAME="UNIMARC" -->
 <!-- TMPL_INCLUDE NAME="subtypes_unimarc.inc" -->
 <!-- TMPL_ELSE -->
-<div id="sidebar">
 <!-- SUBTYPE LIMITS -->
         <fieldset>
         <legend>Subtype limits:</legend><p>
         
         <select name="limit" class="subtype">
-            <option value="" selected="selected" class="menuheader">Any Audience</option>
-            <option value="aud:a" >Easy</option>
-            <option value="aud:c" >Juvenile</option>
-            <option value="aud:d" >Young Adult</option>
-            <option value="aud:e" >Adult</option>
+            <option value="" selected="selected" class="menuheader">Any audience</option>
+                       <option value="aud:a">Preschool</option>
+                       <option value="aud:b">Primary</option>
+                       <option value="aud:c">Pre-adolescent</option>
+                       <option value="aud:d">Adolescent</option>
+                       <option value="aud:e">Adult</option>
+                       <option value="aud:f">Specialized</option>
+                       <option value="aud:g">General</option>
+                       <option value="aud:j">Juvenile</option>
         </select>
         
         <select name="limit" class="subtype">
-            <option value="" selected="selected" class="menuheader">Any Content</option>
+            <option value="" selected="selected" class="menuheader">Any content</option>
             <option value="fic:1" >Fiction</option>
-            <option value="fic:0" >Non Fiction</option>
+            <option value="fic:0" >Non fiction</option>
             <option value="bio:b" >Biography</option>
             <option value="mus:j" >Musical recording</option>
             <option value="mus:i" >Non-musical recording</option>
 
         
         <select name="limit" class="subtype">
-            <option value="" selected="selected" class="menuheader">Any Format</option>
+            <option value="" selected="selected" class="menuheader">Any format</option>
             <option value="l-format:ta" >Regular print</option>
             <option value="l-format:tb" >Large print</option>
             <option value="l-format:fk" >Braille</option>
         </select>
         
         <select name="limit" class="subtype">
-            <option value="" >Additional Content Types</option>
+            <option value="" >Additional content types</option>
             <option value="ctype:a" >Abstracts/summaries</option>
             <option value="ctype:b" >Bibliographies</option>
             <option value="ctype:c" >Catalogs</option>
        </p>
 
 </fieldset>
-<!-- /TMPL_ELSE -->
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="template-defined-limits" -->
+<!-- TYPE LIMITS -->
+    <fieldset>
+
+    <legend>Limit to any of the following</legend>
+    <table class="itemtypes">
+            <tr>
+            <td><input type="checkbox" id="mc-bks" name="limit" value="mc:t" />
+                       <label for="mc-bks" title="Books, Pamphlets, Technical reports, Manuscripts, Legal papers, Theses and dissertations">
+                       <img border="0" src="/intranet-tmpl/prog/img/AF.gif" alt="Books" />Books</label></td>
+                       <td><input type="checkbox" id="mc-vis" name="limit" value="mc:v" />
+                       <label for="mc-vis" title="Motion pictures, Videorecordings, Filmstrips, Slides, Transparencies, Photos, Cards, Charts, Drawings">
+                       <img border="0" src="/intranet-tmpl/prog/en/images/AV Aids.gif" alt="Visual Materials" />Visual Materials</label></td>
+            <td><input type="checkbox" id="mc-sr" name="limit" value="mc-rtype:i" />
+                       <label for="mc-sr" title="Spoken, Books on CD and Cassette">
+                       <img border="0" src="/intranet-tmpl/prog/en/images/AF.gif" alt="Books on Tape" />Books on Tape</label></td>
+            </tr>
+
+            <tr>
+            <td><input type="checkbox" id="mc-cf" name="limit" value="mc:c" />
+                       <label for="mc-cf" title="Computer files, Data, Software">
+                       <img border="0" src="/intranet-tmpl/prog/en/images/CD-ROM software.gif" alt="Computer Files" />Computer Files</label></td>
+            <td><input type="checkbox" id="mc-lh" name="limit" value="mc-collection:LH" />
+                       <label for="mc-lh" title="Local History Materials">
+                       <img border="0" src="/intranet-tmpl/prog/en/images/Local history.gif" alt="Local History Materials" />Local History Materials</label></td>
+            <td><input type="checkbox" id="mc-map" name="limit" value="mc:a" />
+                       <label for="mc-map" title="Maps, Globes">
+                       <img border="0" src="/intranet-tmpl/prog/en/images/PF.gif " alt="Maps" />Maps</label></td>
+            </tr>
+
+            <tr>
+            <td><input type="checkbox" id="mc-mus" name="limit" value="mc-rtype:j" />
+                       <label for="mc-mus" title="Music">
+                       <img border="0" src="/intranet-tmpl/prog/en/images/CDM.gif" alt="Music" />Music</label></td>
+            <td><input type="checkbox" id="mc-kit" name="limit" value="mc-rtype:o" />
+                       <label for="mc-kit" title="Kits"><img border="0" src="/intranet-tmpl/prog/en/images/KIT.gif" alt="Kits" />Kits</label></td>
+            <td><input type="checkbox" id="mc-ref" name="limit" value="mc-collection:REF" />
+                       <label for="mc-ref" title="Reference">
+                       <img border="0" src="/intranet-tmpl/prog/en/images/REF.gif" alt="Reference" />Reference</label></td>
+            </tr>
+            
+            </table>
+</fieldset>
+<!-- /TMPL_IF -->
+<!-- /TYPE LIMITS -->
 
 <!-- AVAILABILITY LIMITS -->
     <fieldset><legend>Location and availability: </legend>
         <p>
-        <label for="available-items">Only items currently available</label><input type="checkbox" id="available-items" name="limit" value="available" /></p>
+        <label for="available-items">Only items currently available</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
         <p>
-        <label>Individual Libraries </label><select name="limit" id="branchloop" onchange='if(this.value != ""){document.getElementById("categoryloop").disabled=true;} else {document.getElementById("categoryloop").disabled=false;}'>
+        <label for="branchloop">Individual Libraries:</label><select name="limit" id="branchloop" onchange='if(this.value != ""){document.getElementById("categoryloop").disabled=true;} else {document.getElementById("categoryloop").disabled=false;}'>
         <option value="">All Libraries</option>
         <!-- TMPL_LOOP NAME="branchloop" -->
-        <option value="homebranch:<!-- TMPL_VAR NAME='value' -->"><!-- TMPL_VAR NAME='branchname' --></option>
+        <!-- TMPL_IF NAME="selected" -->
+        <option value="branch:<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
+        <!-- TMPL_ELSE -->
+        <option value="branch:<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
+        <!-- /TMPL_IF -->
         <!-- /TMPL_LOOP -->
         </select>
-               <!-- <input type='hidden' name='limit' value='branch: MAIN' /> -->
+    <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
         </p>
         <!-- TMPL_IF NAME="searchdomainloop" -->
-               <p>OR<p> <!-- should addjs to grey out group pulldown if a library is selected. -->
-               <p>
-        <label>Groups of Libraries</label><select name="multibranchlimit" id="categoryloop">
+    <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
+    <p>
+        <label for="categoryloop">Groups of Libraries</label><select name="multibranchlimit" id="categoryloop">
         <option value=""> -- none -- </option>
         <!-- TMPL_LOOP NAME="searchdomainloop" -->
-        <option value="<!-- TMPL_VAR NAME='categorycode' -->"><!-- TMPL_VAR NAME='categoryname' --></option>
+        <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="categoryname" --></option>
         <!-- /TMPL_LOOP -->
         </select>
         </p>
-               <!-- /TMPL_IF -->
+    <!-- /TMPL_IF -->
     </fieldset>
 <!-- /AVAILABILITY LIMITS -->
 
 
 <fieldset><legend>Sort by: </legend>
     <p><select id="sort_by" name="sort_by">
-       <!-- TMPL_INCLUDE NAME="resort_form.inc" -->
+  <!-- TMPL_INCLUDE NAME="resort_form.inc" -->
     </select>
         </p>
 </fieldset>
 <!-- RANK LIMITS -->
+
+</div>
+
+
 <!-- SEARCH BUTTONS -->
             <p><input class="submit" type="submit" accesskey="s" value="Search" />
             <!-- TMPL_IF NAME="expanded_options" -->
             <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear">[New search]</a> 
             </p>
 <!-- /SEARCH BUTTONS -->
-</div>
 </form>
-
-</div>
 </div>
 
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->