Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/apikeys.tt
Owen Leonard 2d7eba5be3 Bug 22698: Fix incorrect button classes
This patch builds on Bug 22023 in making further corrections to toolbar
button classes.

To test, apply the patch and view the following pages to confirm that
toolbar buttons are consistent:

- Acquisitions -> Vendor -> View basket.
- Administration -> Additional fields -> Select a table.
- Administration -> Audio alerts.
- Catalog -> Advanced search -> More/fewer options link
- Cataloging -> Edit record -> Advanced editor -> Advanced search.
- Cataloging -> Edit record -> Advanced editor -> Macros.
- Cataloging -> Edit record -> MARC21 008 value builder.
- Cataloging -> Search results.
- Circulation -> Checkout notes.
- Circulation: Sticky due date clear button, view restrictions, override
   restrictions temporarily, add message, delete message
- Course reserves: Toolbar buttons on that page and the course reserve
   detail page.
- ILL requests -> View ILL requests. The "New ILL request" and "List
   requests" button.
- Lists and Lists -> View list.
- Patrons -> Search -> Merge patrons.
- Patrons -> View patron -> "Edit" button on patron image (patronimages
   must be enabled).
- Patrons -> View patron -> "More" menu -> Manage API keys.
- Patrons -> View patron -> "More" menu -> Set permissions.
- Patrons -> View patron -> Delete circulation message link.
- Patrons -> View patron -> Edit patron.
- Patrons -> View patron -> Housebound.
- Reports -> Dictionary.
- Serials -> Numbering patterns.
- Serials -> Subscription -> Receive.
- Tools -> Labels -> Manage -> Label batches: Export selected.
- Tools -> Patron card creator -> Manage -> Card batches -> Edit batch.
- Tools -> Patron card creator. The "New" and "Manage" buttons.
- Tools -> Patron clubs.
- Tools -> Quote editor -> Import quotes.
- Tools -> Rotating collections. Toolbar buttons on that page and the
   collection view page.
- Tools -> Tags.
- Tools -> Upload local cover image.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-16 13:17:33 +00:00

120 lines
6.1 KiB
Text

[% USE raw %]
[% USE Koha %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo; API Keys</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="pat_apikeys" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
&rsaquo;
<a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
&rsaquo;
API Keys for [% INCLUDE 'patron-title.inc' %]
</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% INCLUDE 'members-toolbar.inc' %]
<h1>API keys for [% INCLUDE 'patron-title.inc' %]</h1>
<form id="add-api-key" action="/cgi-bin/koha/members/apikeys.pl" method="post" style="display:none">
<input type="hidden" name="patron_id" value="[% patron.id | html %]" />
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
<input type="hidden" name="op" value="generate" />
<fieldset class="brief">
<legend>Generate new client id/secret pair</legend>
<ol>
<li>
<label for="description">Description: </label>
<input type="text" name="description" />
<input type="submit" value="Save" />
<a href="#" class="cancel toggle_element" data-element="#add-api-key">Cancel</a>
</li>
</ol>
</fieldset>
</form>
<div id="keys">
[% IF api_keys && api_keys.size > 0 %]
<p>
<button class="btn btn-default 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>
</p>
<table>
<thead>
<tr>
<th>Description</th>
<th>Client ID</th>
<th>Secret</th>
<th>Active</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
[% FOREACH key IN api_keys %]
<tr>
<td>[% key.description | html %]</td>
<td>[% key.client_id | html %]</td>
<td>[% key.secret | html %]</td>
<td>[% IF key.active %]Yes[% ELSE %]No[% END %]</td>
<td>
<form action="/cgi-bin/koha/members/apikeys.pl" method="post">
<input type="hidden" name="patron_id" value="[% patron.id | html %]" />
<input type="hidden" name="key" value="[% key.id | html %]" />
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
<input type="hidden" name="op" value="delete" />
<button class="btn btn-default btn-xs delete" type="submit"><i class="fa fa-trash"></i> Delete</button>
</form>
<form action="/cgi-bin/koha/members/apikeys.pl" method="post">
<input type="hidden" name="patron_id" value="[% patron.id | html %]" />
<input type="hidden" name="key" value="[% key.id | html %]" />
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
[% IF key.active %]
<input type="hidden" name="op" value="revoke" />
<button class="btn btn-default btn-xs" type="submit"><i class="fa fa-remove"></i> Revoke</button>
[% ELSE %]
<input type="hidden" name="op" value="activate" />
<button class="btn btn-default btn-xs" type="submit"><i class="fa fa-play"></i> Activate</button>
[% END %]
</form>
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<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>
[% END %]
</div>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'circ-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
<script>
$(document).ready(function(){
$(".delete").on("click", function(e){
return confirmDelete(_("Are you sure you want to delete this key?"));
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]