Bug 33883: "Make sure to copy your API secret" message overlaps text

This patch updates the markup on the patron API keys page so that it
uses standard classes for dialogs and page sections.

To test you must have RESTOAuth2ClientCredentials enabled.

- Apply the patch and locate a patron record.
- From their checkout or detail page, choose More -> Manage API keys
- Click "Generate a new client id/secret pair"
- Enter a description and click Save.
- You should see a message in a standard message-style dialog, "Make
  sure to copy your API secret now. You won’t be able to see it again!"
- The API key information should be displayed in a .page-section div.
- The table of existing keys should be displayed in a .page-section div.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-06-02 14:00:34 +00:00 committed by Tomas Cohen Arazi
parent b754eb5b5a
commit 7c652ce764
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -36,8 +36,8 @@
[% IF fresh_api_key %]
[%# A fresh api key was generated, display the secret, only once %]
<div class="rows">
<span class="alert">Make sure to copy your API secret now. You wont be able to see it again!</span>
<div class="dialog message">Make sure to copy your API secret now. You wont be able to see it again!</div>
<div class="page-section rows">
<ol>
<li>
<span class="label">Description: </span>
@ -72,8 +72,8 @@
</fieldset>
</form>
<div id="keys">
[% IF api_keys.count %]
[% IF api_keys.count %]
<div class="page-section" id="keys">
<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>
@ -117,18 +117,18 @@
[% END %]
</tbody>
</table>
[% ELSE %]
<div class="dialog message">
<div>No keys defined for the current patron.</div>
<div>
<a href="#" class="toggle_element" data-element="#add-api-key" id="show-api-form">
<i class="fa fa-plus"></i>
<span>Generate a new client id/secret pair</span>
</a>
<div>
</div>
[% END %]
</div>
</div> <!-- /#keys.page-section -->
[% ELSE %]
<div class="dialog message">
<p>No keys defined for the current patron.</p>
<p>
<a href="#" class="btn btn-default toggle_element" data-element="#add-api-key" id="show-api-form">
<i class="fa fa-plus"></i>
<span>Generate a new client id/secret pair</span>
</a>
<p>
</div>
[% END # /IF api_keys.count %]
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->