Bug 19786: Move template JavaScript to the footer: Authorities, part 2
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / subscriptions-search.inc
index db65f93..7fdea9c 100644 (file)
@@ -1,49 +1,47 @@
+[% PROCESS 'html_helpers.inc' %]
 <div id="advsearch">
     <form action="" method="get">
         <fieldset class="brief">
-            <a id="unfold_advsearch" style="cursor:pointer" onclick="$('#advsearch_form').slideToggle(400);">Advanced search</a>
+        <a href="#" class="toggle_element" data-element="#advsearch_form">Advanced search</a>
             <div id="advsearch_form" style="display:none">
             <ol>
               <li>
                 <label for="issn">ISSN:</label>
-                <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
+                <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter | html %]" />
               </li>
               <li>
                 <label for="title">Title:</label>
-                <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
+                <input type="text" id="title" name="title_filter" value="[% title_filter | html %]" />
               </li>
+              [% IF Koha.Preference( 'marcflavour' ) == "UNIMARC" %]
               <li>
                 <label for="ean">EAN:</label>
-                <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
+                <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter | html %]" />
               </li>
+              [% END %]
               <li>
                 <label for="publisher">Publisher:</label>
-                <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
+                <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" />
               </li>
               <li>
-                <label for="supplier">Supplier:</label>
-                <input type="text" id="supplier" name="supplier_filter" value="[% supplier_filter %]" />
+                <label for="supplier">Vendor:</label>
+                <input type="text" id="supplier" name="supplier_filter" value="[% supplier_filter | html %]" />
               </li>
               <li>
-                <label for="branch">Branch:</label>
+                <label for="branch">Library:</label>
                 <select id="branch" name="branch_filter">
                   <option value="">All</option>
-                  [% FOREACH branch IN branches_loop %]
-                    [% IF (branch.selected) %]
-                      <option selected="branch.selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
-                    [% ELSE %]
-                      <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
-                    [% END %]
-                  [% END %]
+                  [%# FIXME Should not we filter the libraries? %]
+                  [% PROCESS options_for_libraries libraries => Branches.all( selected => branch_filter, unfiltered => 1 ) %]
                 </select>
               </li>
             </ol>
             <input type="hidden" name="searched" value="1" />
             [% IF (booksellerid) %]
-                <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
+                <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
             [% END %]
             [% IF (basketno) %]
-                <input type="hidden" name="basketno" value="[% basketno %]" />
+                <input type="hidden" name="basketno" value="[% basketno | html %]" />
             [% END %]
             <fieldset class="action">
               <input type="submit" value="Search" />