Bug 19786: Move template JavaScript to the footer: Authorities, part 2
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / subscriptions-search.inc
index 5ef2f85..7fdea9c 100644 (file)
@@ -1,3 +1,4 @@
+[% PROCESS 'html_helpers.inc' %]
 <div id="advsearch">
     <form action="" method="get">
         <fieldset class="brief">
                 <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>