-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide chatbot authentication string (#1629)
- Loading branch information
1 parent
d9010c4
commit 6a06231
Showing
1 changed file
with
15 additions
and
3 deletions.
There are no files selected for viewing
18 changes: 15 additions & 3 deletions
18
messaging/templates/messaging/tags/chatbot_auth_tokens.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
<span style="font-weight: bold">Chatbot Authentication Headers</span> | ||
<p style="text-transform: none; display: inline-block"> | ||
{% for username, token in tokens.items %} | ||
<div style="word-wrap: break-word; width: 80%"><strong>{{ username }}:</strong> {{ token }}</div> | ||
{% endfor %} | ||
{% for username, token in tokens.items %} | ||
<div style="word-wrap: break-word; width: 80%"> | ||
<strong>{{ username }}:</strong> | ||
<span class="hidden" style="display: none;">{{ token }}</span> | ||
<button onclick="toggleVisibility(this)" style="display: inline-block;">Reveal Token</button> | ||
</div> | ||
{% endfor %} | ||
</p> | ||
|
||
<script> | ||
function toggleVisibility(button) { | ||
var tokenSpan = button.previousElementSibling; | ||
tokenSpan.style.display = (tokenSpan.style.display === "none") ? "inline-block" : "none"; | ||
button.textContent = (tokenSpan.style.display === "none") ? "Reveal Token" : "Hide Token"; | ||
} | ||
</script> |