Skip to content

Commit 5a58841

Browse files
parameterize challenge url
1 parent 53ddd53 commit 5a58841

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

layouts/partials/captcha.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
{{ $defaultChallengeUrl := printf "%s/altcha/challenge.php" site.Params.legacyApiUrl }}
12
<altcha-widget
2-
challengeurl="{{ site.Params.legacyApiUrl }}/altcha/challenge.php"
3+
challengeurl="{{ .challengeUrl | default $defaultChallengeUrl }}"
34
hidelogo
45
hidefooter
56
floating="auto"

layouts/partials/donate-creditcard.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
{{ i18n "donate_creditcard_once_paynow" }}
4949
</button>
5050

51-
{{ partial "captcha.html" (dict "captchaPayload" "oneTimePaymentStatus.captcha" "captchaState" "captchaState") }}
51+
{{ $challengeUrl := printf "%s/donations/stripe/payments/challenge" .Site.Params.apiBaseUrl }}
52+
{{ partial "captcha.html" (dict "challengeUrl" $challengeUrl "captchaPayload" "oneTimePaymentStatus.captcha" "captchaState" "captchaState") }}
5253

5354
<p class="text-sm text-red-600 mt-2" x-text="oneTimePaymentStatus.errorMessage"></p>
5455
</div>

0 commit comments

Comments
 (0)