Bug 14829: Fix shortcuts in the cataloging and patron modules
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 16 Sep 2015 08:01:26 +0000 (09:01 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 2 Oct 2015 18:08:42 +0000 (15:08 -0300)
In these 2 modules, the shortcuts alt+q, alt+r and alt+u don't work as
in other modules.
The tab are not "built" in the correct order and the id returned to
select the correct tab is wrong.

Test plan:
Go on the circ home page (circ/circulation-home.pl), the patron home
page (members/members-home.pl) and the cataloging home page
(cataloguing/addbooks.pl).
On these 3 pages, without this patch, the shortcuts select different
tabs.
With this patch, the issue is fixed for all of them.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc

index 1fda946..4b6a9de 100644 (file)
@@ -10,6 +10,8 @@
             </form>
         </div>
 
+        [% INCLUDE 'patron-search-box.inc' %]
+
         [% IF ( CAN_user_circulate ) %]
         <div id="checkin_search" class="residentsearch">
             <p class="tip">Scan a barcode to check in:</p>
@@ -28,7 +30,6 @@
             </form>
         </div>
 
-        [% INCLUDE 'patron-search-box.inc' %]
         <ul>
             <li><a onclick="keep_text(0)" href="#addbooks_search">Cataloging search</a></li>
             [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text(1)" href="#circ_search">Check out</a></li>[% END %]
index bb09574..e831487 100644 (file)
 </div>
     [% INCLUDE 'patron-search-box.inc' %]
 
-    [% IF ( CAN_user_catalogue ) %]
-    <div id="catalog_search" class="residentsearch">
-    <p class="tip">Enter search keywords:</p>
-        <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" id="cat-search-block">
-             <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
-                <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
-        </form>
-    </div>[% END %]
     [% IF ( CAN_user_circulate ) %]
     <div id="checkin_search" class="residentsearch">
     <p class="tip">Scan a barcode to check in:</p>
     </form>
     </div>
     [% END %]
+
+    [% IF ( CAN_user_catalogue ) %]
+    <div id="catalog_search" class="residentsearch">
+    <p class="tip">Enter search keywords:</p>
+        <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" id="cat-search-block">
+             <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
+                <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
+        </form>
+    </div>[% END %]
+
     <ul>
         <li><a onclick="keep_text(0)" href="#patron_search">Search patrons</a></li>
         [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text(1)" href="#circ_search">Check out</a></li>[% END %]