summaryrefslogtreecommitdiffstats
path: root/app/views/my/_sidebar.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/my/_sidebar.html.erb')
-rw-r--r--app/views/my/_sidebar.html.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/my/_sidebar.html.erb b/app/views/my/_sidebar.html.erb
index a35bcaf77..7f0aefa16 100644
--- a/app/views/my/_sidebar.html.erb
+++ b/app/views/my/_sidebar.html.erb
@@ -21,8 +21,8 @@
<% if Setting.rest_api_enabled? %>
<h4><%= l(:label_api_access_key) %></h4>
<div>
- <%= link_to_function(l(:button_show), "$('#api-access-key').toggle();")%>
- <pre id='api-access-key' class='autoscroll'><%= @user.api_key %></pre>
+ <%= link_to l(:button_show), {:action => 'show_api_key'}, :remote => true %>
+ <pre id='api-access-key' class='autoscroll'></pre>
</div>
<%= javascript_tag("$('#api-access-key').hide();") %>
<p>