Skip to content

Commit

Permalink
Fix styles for application keys form (#3942)
Browse files Browse the repository at this point in the history
* Fix styles

* Move the create key links out of the table
  • Loading branch information
mayorova authored Nov 29, 2024
1 parent ef08f84 commit 3cd727c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
3 changes: 3 additions & 0 deletions app/views/provider/admin/applications/show.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
- content_for :menu do
= render 'menu'

- content_for :javascripts do
= stylesheet_packs_chunks_tag 'pf_form'

- content_for :custom_page_header do
section class="pf-c-page__main-section pf-m-light"
div class="pf-c-content"
Expand Down
36 changes: 17 additions & 19 deletions app/views/provider/admin/keys/_widget.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,24 @@

<% if cinstance.backend_version.app_keys_allowed? %>
<%- can_add_keys = cinstance.application_keys.can_add? %>
<table class="list">
<tr>
<td colspan="2" id="app-keys-operations" <%= "style=display:none;" unless can_add_keys %>>
<% if cinstance.custom_keys_enabled? %>
<%= link_to 'Add Custom key', new_provider_admin_application_key_path(cinstance),
class: 'fancybox action add',
'data-autodimensions' => 'true',
title: 'Add Custom key' %>
<% end %>
<%= link_to 'Add Random key', provider_admin_application_keys_path(cinstance),
method: :post,
remote: true,
class: 'create_key add action' %>
</td>
<div class="pf-c-card__body">
<div id="app-keys-operations" <%= "style=display:none;" unless can_add_keys %>>
<% if cinstance.custom_keys_enabled? %>
<%= link_to 'Add Custom key', new_provider_admin_application_key_path(cinstance),
class: 'fancybox action add',
'data-autodimensions' => 'true',
title: 'Add Custom key' %>
<% end %>
<%= link_to 'Add Random key', provider_admin_application_keys_path(cinstance),
method: :post,
remote: true,
class: 'create_key add action pull-right' %>
</div>

<td colspan="2" id="app-keys-limit-warning" <%= "style=display:none;" if can_add_keys %>>
Keys limit reached.
</td>
</tr>
</table>
<div id="app-keys-limit-warning" <%= "style=display:none;" if can_add_keys %>>
Keys limit reached.
</div>
</div>
<% end %>
<% elsif cinstance.backend_version.oauth? %>
Expand Down

0 comments on commit 3cd727c

Please sign in to comment.