Skip to content

Commit

Permalink
Updated copy button
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSeverinsen committed Apr 18, 2024
1 parent b49393d commit 3926d54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/templates/secrets_admin.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends "admin/base_site.html" %}
{% block scripts %}
<script>
function CopyText() {
var text = document.getElementById('value')
function CopyText(value) {
var text = document.getElementById(value)
text.select();
document.execCommand('copy')
}
Expand Down Expand Up @@ -30,8 +30,8 @@
</td>
<td>
{% if value != None %}
<code id="value">{{ value }}</code>
<button onclick="CopyText()">Copy</button>
<code id="{{ value }}">{{ value }}</code>
<button type="submit" onclick="CopyText({{ value }})">Copy</button>
{% else %}
<b>Missing from environment</b>
{% endif %}
Expand Down

0 comments on commit 3926d54

Please sign in to comment.