Skip to content

Commit 5d19598

Browse files
authored
Add turnstile to docusight widget (#1975)
1 parent 7895fce commit 5d19598

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

layouts/partials/feedback.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{{/* Star rating adapted from https://codepen.io/chris22smith/pen/MJzLJN */}}
2+
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
3+
<script>
4+
function enableSubmit() {
5+
document.getElementById("submit-button").disabled = false;
6+
}
7+
</script>
8+
29
<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">
310
<input name="origin" value="{{ .Permalink }}" class="hidden"/>
411
<div class="flex flex-row justify-between">
@@ -23,7 +30,8 @@
2330
class=" p-2 mt-1 block w-full h-24 border border-opacity-50 border-redis-ink-900 rounded-md"
2431
rows="3"
2532
></textarea>
26-
<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">
33+
<div class="cf-turnstile" data-sitekey="0x4AAAAAABpkO-YRJzl4qTBW" data-callback="enableSubmit"></div>
34+
<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">
2735
Submit
2836
</button>
2937
</div>

0 commit comments

Comments
 (0)