Skip to content

Commit 8e2e792

Browse files
committed
deduplicated accept-* partials into single checkbox partial
1 parent 1cf1590 commit 8e2e792

19 files changed

+19
-34
lines changed

layouts/for-individuals/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ <h2 id="newsletter" class="font-h2 mb-4">{{ i18n "home_newsletter_title" . }}</h
183183
<i :class="{'fa-envelope': !data.inProgress, 'fa-spinner fa-spin': data.inProgress}" class="fas fa-fw" aria-hidden="true"></i> {{ i18n "home_newsletter_subscribe" }}
184184
</button>
185185
</div>
186-
<p class="font-p">{{ partial "accept-newsletter-privacy.html" (dict "context" . "alpineVariable" "data.acceptTerms") }}</p>
186+
<p class="font-p">{{ partial "checkbox.html" (dict "context" . "alpineVariable" "data.acceptTerms" "label" (i18n "accept_newsletter_privacy" | safeHTML)) }}</p>
187187
<p :class="{'hidden': !data.errorMessage}" class="text-sm text-red-600 mt-2" x-text="data.errorMessage"></p>
188188
</form>
189189

layouts/for-teams/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ <h2 id="newsletter" class="font-h2 mb-4">{{ i18n "hub_newsletter_title" . }}</h2
122122
<i :class="{'fa-envelope': !data.inProgress, 'fa-spinner fa-spin': data.inProgress}" class="fas fa-fw" aria-hidden="true"></i> {{ i18n "hub_newsletter_subscribe" }}
123123
</button>
124124
</div>
125-
<p class="font-p">{{ partial "accept-newsletter-privacy.html" (dict "context" . "alpineVariable" "data.acceptTerms") }}</p>
125+
<p class="font-p">{{ partial "checkbox.html" (dict "context" . "alpineVariable" "data.acceptTerms" "label" (i18n "accept_newsletter_privacy" | safeHTML)) }}</p>
126126
<p :class="{'hidden': !data.errorMessage}" class="text-sm text-red-600 mt-2" x-text="data.errorMessage"></p>
127127
</form>
128128

layouts/hub-billing/single.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ <h2 class="inline-flex px-4 py-1 rounded-full text-sm font-medium tracking-wide
369369
<p class="font-p mb-4">
370370
{{ i18n "hub_billing_checkout_standard_instruction" . }}
371371
</p>
372-
<p x-show="subscriptionData.customBilling?.managed" class="font-p mb-4">{{ partial "accept-hub-managed-terms-and-privacy.html" (dict "context" . "alpineVariable" "acceptTerms") }}</p>
373-
<p x-show="!subscriptionData.customBilling?.managed" class="font-p mb-4">{{ partial "accept-terms-and-privacy.html" (dict "context" . "alpineVariable" "acceptTerms") }}</p>
372+
<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>
373+
<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>
374374
<button :disabled="subscriptionData.inProgress || !acceptTerms" @click.prevent="hubSubscription.checkout('{{ .Site.Language.Lang }}')" type="submit" class="btn btn-primary w-full lg:w-1/2">
375375
<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>
376376
{{ i18n "hub_billing_checkout_standard_submit" . }}

layouts/hub-managed/single.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ <h2 class="font-h2 mb-6">
172172
</li>
173173
</ul>
174174
<p class="font-p text-sm mb-2">
175-
{{ partial "accept-hub-managed-terms-and-privacy.html" (dict "context" . "alpineVariable" "acceptTerms") }}
175+
{{ partial "checkbox.html" (dict "context" . "alpineVariable" "acceptTerms" "label" (i18n "accept_hub_managed_terms_and_privacy" | safeHTML)) }}
176176
</p>
177177
<p class="font-p text-sm mb-2">
178-
{{ partial "accept-hub-newsletter-optional.html" (dict "context" . "alpineVariable" "submitData.acceptNewsletter") }}
178+
{{ partial "checkbox.html" (dict "context" . "alpineVariable" "submitData.acceptNewsletter" "label" (i18n "accept_hub_newsletter_optional")) }}
179179
</p>
180180
<div class="mt-auto">
181181
<p :class="{'hidden': !feedbackData.errorMessage}" class="text-sm text-red-600 mb-2" x-text="feedbackData.errorMessage"></p>

layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h2 id="newsletter" class="font-h2 mb-4">{{ i18n "home_newsletter_title" . }}</h
130130
<i :class="{'fa-envelope': !data.inProgress, 'fa-spinner fa-spin': data.inProgress}" class="fas fa-fw" aria-hidden="true"></i> {{ i18n "home_newsletter_subscribe" }}
131131
</button>
132132
</div>
133-
<p class="font-p">{{ partial "accept-newsletter-privacy.html" (dict "context" . "alpineVariable" "data.acceptTerms") }}</p>
133+
<p class="font-p">{{ partial "checkbox.html" (dict "context" . "alpineVariable" "data.acceptTerms" "label" (i18n "accept_newsletter_privacy" | safeHTML)) }}</p>
134134
<p :class="{'hidden': !data.errorMessage}" class="text-sm text-red-600 mt-2" x-text="data.errorMessage"></p>
135135
</form>
136136

layouts/partials/accept-hub-managed-terms-and-privacy.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

layouts/partials/accept-hub-newsletter-optional.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

layouts/partials/accept-newsletter-optional.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

layouts/partials/accept-newsletter-privacy.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

layouts/partials/accept-terms-and-privacy.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)