Skip to content

Commit 0967e4e

Browse files
committed
captcha finetuning and fixes
1 parent 5ac7ee3 commit 0967e4e

File tree

11 files changed

+20
-16
lines changed

11 files changed

+20
-16
lines changed

assets/js/cardpayments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ class OneTimePayment {
128128
this._status.errorMessage = error.message;
129129
this._status.inProgress = false;
130130
this._status.captcha = null;
131+
// TODO: reset captcha
131132
}
132133

133134
onPaymentSucceeded() {
134135
console.info('Stripe payment succeeded!');
135136
this._status.success = true;
136137
this._status.errorMessage = '';
137138
this._status.inProgress = false;
138-
this._status.captcha = null;
139139
}
140140

141141
}

assets/js/hubdemo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class HubDemo {
3636
this._feedbackData.success = false;
3737
this._feedbackData.inProgress = false;
3838
this._feedbackData.errorMessage = error;
39+
// TODO: reset captcha
3940
}
4041

4142
onRequestSucceeded(data) {

assets/js/hubmanaged.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class HubManaged {
119119
this._feedbackData.success = false;
120120
this._feedbackData.inProgress = false;
121121
this._feedbackData.errorMessage = error;
122+
// TODO: reset captcha
122123
}
123124

124125
onRequestSucceeded() {

assets/js/hubsubscription.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class HubSubscription {
115115
onCreateSessionFailed(error) {
116116
this._subscriptionData.inProgress = false;
117117
this._subscriptionData.errorMessage = error;
118+
// TODO: reset captcha
118119
}
119120

120121
loadCustomBilling(continueHandler) {

assets/js/supportercert.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class SupporterCertificate {
3636
this._feedbackData.success = false;
3737
this._feedbackData.inProgress = false;
3838
this._feedbackData.errorMessage = error;
39+
// TODO: reset captcha
3940
}
4041

4142
onRequestSucceeded() {

i18n/de.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,6 @@
996996
- id: altcha_verified
997997
translation: "Verifiziert!"
998998
- id: altcha_verifying
999-
translation: "Wird überprüft..."
999+
translation: "Verifizierung läuft…"
10001000
- id: altcha_waitAlert
1001-
translation: "Verifizierung...bitte warten."
1001+
translation: "Verifizierung läuft… bitte warten."

i18n/en.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,14 +988,14 @@
988988

989989
# Altcha
990990
- id: altcha_label
991-
translation: "I\\'m not a bot"
991+
translation: "I'm not a bot"
992992
- id: altcha_error
993993
translation: "Verification failed. Try again later."
994994
- id: altcha_expired
995995
translation: "Verification expired. Try again."
996996
- id: altcha_verified
997997
translation: "Verified!"
998998
- id: altcha_verifying
999-
translation: "Verifying..."
999+
translation: "Verifying"
10001000
- id: altcha_waitAlert
1001-
translation: "Verifying... please wait."
1001+
translation: "Verifying please wait."

layouts/hub-billing/single.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ define "main" }}
22
<div class="container pt-12 pb-24">
3-
<form x-data="{subscriptionData: {state: 'MISSING_PARAMS', captcha: null, hubId: null, returnUrl: null, session: null, customBilling: null, monthlyPrice: null, errorMessage: '', inProgress: false, restartModal: {open: false, nextPayment: null}, changeSeatsModal: {open: false, confirmation: false, immediatePayment: null}, token: null, details: null, quantity: 5, email: ''}, acceptTerms: false, hubSubscription: null, captchaState: null}" x-init="hubSubscription = new HubSubscription($refs.form, subscriptionData, new URLSearchParams(location.search))" x-ref="form">
3+
<form x-data="{subscriptionData: {state: 'MISSING_PARAMS', captcha: null, hubId: null, returnUrl: null, session: null, customBilling: null, monthlyPrice: null, errorMessage: '', inProgress: false, restartModal: {open: false, nextPayment: null}, changeSeatsModal: {open: false, confirmation: false, immediatePayment: null}, token: null, details: null, quantity: 5, email: ''}, acceptTerms: false, hubSubscription: null, captchaState: null}" x-init="hubSubscription = new HubSubscription($refs.form, subscriptionData, new URLSearchParams(location.search))" x-ref="form" @submit.prevent="hubSubscription.createSession()">
44
<template x-if="subscriptionData.state == 'MISSING_PARAMS'">
55
<div class="text-center max-w-xl mx-auto">
66
<h3 class="font-headline text-xl md:text-2xl leading-relaxed mb-4">
@@ -35,7 +35,7 @@ <h3 class="font-headline text-xl md:text-2xl leading-relaxed mb-4">
3535
<i class="fas fa-sign-in fa-fw"></i>
3636
{{ i18n "hub_billing_createsession_description" . }}
3737
</p>
38-
<button x-show="subscriptionData.captcha" :disabled="subscriptionData.inProgress || captchaState == 'verifying'" @click.prevent="hubSubscription.createSession()" type="submit" class="btn btn-primary w-full md:w-64">
38+
<button x-show="subscriptionData.captcha" :disabled="subscriptionData.inProgress || captchaState == 'verifying'" type="submit" class="btn btn-primary w-full md:w-64">
3939
<i :class="{'fa-paper-plane': !subscriptionData.inProgress, 'fa-spinner fa-spin': subscriptionData.inProgress}" class="fas fa-fw" aria-hidden="true"></i>
4040
{{ i18n "hub_billing_createsession_submit" . }}
4141
</button>
@@ -201,7 +201,7 @@ <h3 class="font-headline text-xl md:text-2xl leading-relaxed mb-4" id="restart-m
201201
</div>
202202
</div>
203203
<div class="border-t border-primary p-4 md:flex md:flex-row-reverse md:items-center">
204-
<button :disabled="subscriptionData.inProgress" @click.prevent="hubSubscription.restart()" type="submit" class="btn btn-primary shrink-0 w-full mb-4 md:w-auto md:ml-3 md:mb-0">
204+
<button :disabled="subscriptionData.inProgress" @click.prevent="hubSubscription.restart()" type="button" class="btn btn-primary shrink-0 w-full mb-4 md:w-auto md:ml-3 md:mb-0">
205205
<i :class="{'fa-check': !subscriptionData.inProgress, 'fa-spinner fa-spin': subscriptionData.inProgress}" class="fas fa-fw" aria-hidden="true"></i>
206206
{{ i18n "hub_billing_manage_modal_confirm" . }}
207207
</button>
@@ -267,11 +267,11 @@ <h3 class="font-headline text-xl md:text-2xl leading-relaxed mb-4" id="change-se
267267
</div>
268268
</div>
269269
<div class="border-t border-primary p-4 md:flex md:flex-row-reverse md:items-center">
270-
<button x-show="!subscriptionData.changeSeatsModal.confirmation" :disabled="subscriptionData.quantity == subscriptionData.details.quantity" @click.prevent="hubSubscription.askForChangeSeatsConfirmation()" type="submit" class="btn btn-primary shrink-0 w-full mb-4 md:w-auto md:ml-3 md:mb-0">
270+
<button x-show="!subscriptionData.changeSeatsModal.confirmation" :disabled="subscriptionData.quantity == subscriptionData.details.quantity" @click.prevent="hubSubscription.askForChangeSeatsConfirmation()" type="button" class="btn btn-primary shrink-0 w-full mb-4 md:w-auto md:ml-3 md:mb-0">
271271
<i class="fas fa-chevron-right fa-fw" aria-hidden="true"></i>
272272
{{ i18n "hub_billing_manage_modal_continue" . }}
273273
</button>
274-
<button x-show="subscriptionData.changeSeatsModal.confirmation" :disabled="subscriptionData.inProgress" @click.prevent="hubSubscription.changeQuantity()" type="submit" class="btn btn-primary shrink-0 w-full mb-4 md:w-auto md:ml-3 md:mb-0">
274+
<button x-show="subscriptionData.changeSeatsModal.confirmation" :disabled="subscriptionData.inProgress" @click.prevent="hubSubscription.changeQuantity()" type="button" class="btn btn-primary shrink-0 w-full mb-4 md:w-auto md:ml-3 md:mb-0">
275275
<i :class="{'fa-check': !subscriptionData.inProgress, 'fa-spinner fa-spin': subscriptionData.inProgress}" class="fas fa-fw" aria-hidden="true"></i>
276276
{{ i18n "hub_billing_manage_modal_confirm" . }}
277277
</button>
@@ -369,7 +369,7 @@ <h2 class="inline-flex px-4 py-1 rounded-full text-sm font-medium tracking-wide
369369
</p>
370370
<p x-show="subscriptionData.customBilling?.managed" class="font-p mb-4">{{ partial "checkbox.html" (dict "context" . "alpineVariable" "acceptTerms" "label" (i18n "accept_hub_managed_terms_and_privacy" | safeHTML)) }}</p>
371371
<p x-show="!subscriptionData.customBilling?.managed" class="font-p mb-4">{{ partial "checkbox.html" (dict "context" . "alpineVariable" "acceptTerms" "label" (i18n "accept_terms_and_privacy" | safeHTML)) }}</p>
372-
<button :disabled="subscriptionData.inProgress || !acceptTerms" @click.prevent="hubSubscription.checkout('{{ .Site.Language.Lang }}')" type="submit" class="btn btn-primary w-full lg:w-1/2">
372+
<button :disabled="subscriptionData.inProgress || !acceptTerms" @click.prevent="hubSubscription.checkout('{{ .Site.Language.Lang }}')" type="button" class="btn btn-primary w-full lg:w-1/2">
373373
<i :class="{'fa-shopping-cart': !subscriptionData.inProgress, 'fa-check': !subscriptionData.inProgress, 'fa-spinner fa-spin': subscriptionData.inProgress}" class="fas fa-fw" aria-hidden="true"></i>
374374
{{ i18n "hub_billing_checkout_standard_submit" . }}
375375
</button>

layouts/hub-demo/single.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ <h1 class="font-h1 mb-8">{{ .Title }}</h1>
55
<p class="lead">{{ i18n "hub_demo_description" }}</p>
66
</header>
77

8-
<form x-ref="form">
8+
<form x-ref="form" @submit.prevent="hubDemo.request()">
99
<section class="relative white-box">
1010
<div x-show="!feedbackData.success" class="px-4 py-5 md:p-6 md:grid md:grid-cols-3 md:gap-6">
1111
<header class="md:col-span-1">
@@ -58,7 +58,7 @@ <h3 class="font-h3">
5858
<p class="font-p mb-4">
5959
{{ i18n "hub_demo_instruction" }}
6060
</p>
61-
<button x-show="submitData.captcha" :disabled="feedbackData.inProgress || captchaState == 'verifying'" @click.prevent="hubDemo.request()" type="submit" class="btn btn-primary w-full md:w-64" x-cloak>
61+
<button x-show="submitData.captcha" :disabled="feedbackData.inProgress || captchaState == 'verifying'" type="submit" class="btn btn-primary w-full md:w-64" x-cloak>
6262
<i :class="{'fa-paper-plane': !feedbackData.inProgress, 'fa-spinner fa-spin': feedbackData.inProgress}" class="fas fa-fw" aria-hidden="true"></i> {{ i18n "hub_demo_submit" }}
6363
</button>
6464
{{ partial "captcha.html" (dict "alpineVariable" "submitData.captcha" "captchaState" "captchaState") }}

layouts/partials/supporter-cert-contributor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<div class="text-center mt-8">
1616
<p class="font-p mb-4">{{ i18n "supporter_cert_contributor_instruction" . | safeHTML }}</p>
1717
<p class="font-p mb-4">{{ partial "checkbox.html" (dict "context" . "alpineVariable" "acceptTerms" "label" (i18n "accept_terms_and_privacy" | safeHTML)) }}</p>
18-
<button :disabled="feedbackData.inProgress || !acceptTerms || captchaState == 'verifying'" class="btn btn-primary w-full md:w-64 plausible-event-name=supporter-cert-contributor-form" data-umami-event="supporter-cert-contributor-submit" x-cloak>
18+
<button :disabled="feedbackData.inProgress || !acceptTerms || captchaState == 'verifying'" type="submit" class="btn btn-primary w-full md:w-64 plausible-event-name=supporter-cert-contributor-form" data-umami-event="supporter-cert-contributor-form" x-cloak>
1919
<i :class="{'fa-paper-plane': !feedbackData.inProgress, 'fa-spinner fa-spin': feedbackData.inProgress}" class="fas fa-fw" aria-hidden="true"></i> {{ i18n "supporter_cert_common_submit" }}
2020
</button>
2121
{{ partial "captcha.html" (dict "alpineVariable" "submitData.captcha" "captchaState" "captchaState") }}

0 commit comments

Comments
 (0)