Skip to content

Commit d06523e

Browse files
momo3404aaronskiba
authored andcommitted
Add copy button to v2 api API Access
update html
1 parent 1928d53 commit d06523e

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

app/views/devise/registrations/_v2_api_token.html.erb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
<div class="form-control mb-3 col-xs-8">
1010
<%= label_tag(:api_token, _('Access token'), class: 'form-label') %>
1111
<% if token.present? %>
12-
<code><%= token %></code>
12+
<%= text_field_tag(
13+
:api_token_val,
14+
token,
15+
id: 'api-token-val',
16+
class: 'form-control',
17+
style: 'width: auto;',
18+
readonly: true
19+
) %>
20+
21+
<%= button_tag(
22+
_('Copy'),
23+
id: 'copy-token-btn',
24+
type: 'button',
25+
class: 'btn btn-secondary'
26+
) %>
1327
<div class="alert alert-warning">
1428
<%= _( "Please copy this token now and store it somewhere safely." ) %><br>
1529
<%= _( "It will disappear after you leave or refresh this page." ) %>

0 commit comments

Comments
 (0)