3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Patrons › API Keys</title>
5 [% INCLUDE 'doc-head-close.inc' %]
7 <body id="pat_apikeys" class="pat">
8 [% INCLUDE 'header.inc' %]
9 [% INCLUDE 'patron-search.inc' %]
11 <div id="breadcrumbs">
12 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
14 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
16 API Keys for [% INCLUDE 'patron-title.inc' %]
19 <div id="doc3" class="yui-t2">
23 [% INCLUDE 'members-toolbar.inc' %]
25 <h1>API keys for [% INCLUDE 'patron-title.inc' %]</h1>
26 <form id="add-api-key" action="/cgi-bin/koha/members/apikeys.pl" method="post" style="display:none">
27 <input type="hidden" name="patron_id" value="[% patron.id %]" />
28 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
29 <input type="hidden" name="op" value="generate" />
30 <fieldset class="brief">
31 <legend>Generate new client id/secret pair</legend>
34 <label for="description">Description: </label>
35 <input type="text" name="description" />
36 <input type="submit" value="Save" />
37 <a href="#" class="cancel toggle_element" data-element="#add-api-key">Cancel</a>
44 [% IF api_keys && api_keys.size > 0 %]
46 <button class="btn btn-default btn-xs toggle_element" type="submit" id="show-api-form" data-element="#add-api-key"><i class="fa fa-plus"></i> Generate a new client id/key pair</button>
59 [% FOREACH key IN api_keys %]
61 <td>[% key.description %]</td>
62 <td>[% key.client_id %]</td>
63 <td>[% key.secret %]</td>
64 <td>[% IF key.active %]Yes[% ELSE %]No[% END %]</td>
66 <form action="/cgi-bin/koha/members/apikeys.pl" method="post">
67 <input type="hidden" name="patron_id" value="[% patron.id %]" />
68 <input type="hidden" name="key" value="[% key.id %]" />
69 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
70 <input type="hidden" name="op" value="delete" />
71 <button class="btn btn-default btn-xs delete" type="submit"><i class="fa fa-trash"></i> Delete</button>
73 <form action="/cgi-bin/koha/members/apikeys.pl" method="post">
74 <input type="hidden" name="patron_id" value="[% patron.id %]" />
75 <input type="hidden" name="key" value="[% key.id %]" />
76 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
78 <input type="hidden" name="op" value="revoke" />
79 <button class="btn btn-default btn-xs" type="submit"><i class="fa fa-remove"></i> Revoke</button>
81 <input type="hidden" name="op" value="activate" />
82 <button class="btn btn-default btn-xs" type="submit"><i class="fa fa-play"></i> Activate</button>
91 <div class="dialog message">No keys defined for the current patron. <a href="#" class="toggle_element" data-element="#add-api-key" id="show-api-form"><i class="fa fa-plus"></i> Generate a new client id/secret pair</div>
97 [% INCLUDE 'circ-menu.inc' %]
101 [% MACRO jsinclude BLOCK %]
103 $(document).ready(function(){
104 $(".delete").on("click", function(e){
105 return confirmDelete(_("Are you sure you want to delete this key?"));
111 [% INCLUDE 'intranet-bottom.inc' %]