Bug 20803: Cannot search to hold or use print options from API keys interface
authorOwen Leonard <oleonard@myacpl.org>
Tue, 22 May 2018 17:46:36 +0000 (17:46 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 23 May 2018 14:44:10 +0000 (11:44 -0300)
This patch adds a required JS asset to the patron API key interface.
Without it, JS-based functions in the toolbar do not work.

To test you must have RESTOAuth2ClientCredentials enabled.

 - From a patron detail page, choose More -> Manage API keys.
 - Test the toolbar buttons on this page, especially "Search to hold"
   and the various print options.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/apikeys.tt

index 73ea916..418c7d1 100644 (file)
@@ -1,4 +1,5 @@
 [% USE Koha %]
+[% USE Asset %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; API Keys</title>
     </div>
 
 [% MACRO jsinclude BLOCK %]
-        <script>
-            $(document).ready(function(){
-                $(".delete").on("click", function(e){
-                    return confirmDelete(_("Are you sure you want to delete this key?"));
-                });
+    [% Asset.js("js/members-menu.js") %]
+    <script>
+        $(document).ready(function(){
+            $(".delete").on("click", function(e){
+                return confirmDelete(_("Are you sure you want to delete this key?"));
             });
-        </script>
+        });
+    </script>
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]