Skip to content

Add turnstile to docusight widget #1975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion layouts/partials/feedback.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{{/* Star rating adapted from https://codepen.io/chris22smith/pen/MJzLJN */}}
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<script>
function enableSubmit() {
document.getElementById("submit-button").disabled = false;
}
</script>

<form id="page-feedback" name="page-feedback" class="text-sm w-full mt-24 pt-5 border-t border-t-redis-pen-700 border-opacity-50">
<input name="origin" value="{{ .Permalink }}" class="hidden"/>
<div class="flex flex-row justify-between">
Expand All @@ -23,7 +30,8 @@
class=" p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md"
rows="3"
></textarea>
<button class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit">
<div class="cf-turnstile" data-sitekey="0x4AAAAAABpkO-YRJzl4qTBW" data-callback="enableSubmit"></div>
<button id="submit-button" disabled class="font-mono button text-redis-ink-900 border border-solid border-transparent bg-redis-red-500 hover:bg-redis-red-600 focus:bg-red-600 focus:ring-red-600; w-min justify-self-end" type="submit">
Submit
</button>
</div>
Expand Down