Skip to content

Commit fc2267c

Browse files
committed
Add optional phone number to hub managed signup form
1 parent 69d6f34 commit fc2267c

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

i18n/de.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,12 @@
734734
translation: "URL"
735735
- id: hub_managed_step_4_quantity
736736
translation: "Erwartete Nutzer"
737+
- id: hub_managed_step_4_phone
738+
translation: "Telefonnummer"
739+
- id: hub_managed_step_4_phone_add
740+
translation: "Telefonnummer hinzufügen (optional)"
741+
- id: hub_managed_step_4_phone_placeholder
742+
translation: "z.B. +49 123 4567890"
737743
- id: hub_managed_step_4_message
738744
translation: "Nachricht"
739745
- id: hub_managed_step_4_message_add

i18n/en.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,12 @@
773773
translation: "URL"
774774
- id: hub_managed_step_4_quantity
775775
translation: "Expected Users"
776+
- id: hub_managed_step_4_phone
777+
translation: "Phone Number"
778+
- id: hub_managed_step_4_phone_add
779+
translation: "Add phone number (optional)"
780+
- id: hub_managed_step_4_phone_placeholder
781+
translation: "e.g., +49 123 4567890"
776782
- id: hub_managed_step_4_message
777783
translation: "Message"
778784
- id: hub_managed_step_4_message_add

layouts/hub-managed/single.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{ partial "altcha-css.html" . }}
33
{{ end }}
44
{{ define "main" }}
5-
<section x-data="{steps: ['{{ i18n "hub_managed_step_1_nav_title" }}', '{{ i18n "hub_managed_step_2_nav_title" }}', '{{ i18n "hub_managed_step_3_nav_title" }}', '{{ i18n "hub_managed_step_4_nav_title" }}'], feedbackData: {currentStep: 0, success: false, inProgress: false, errorMessage: ''}, submitData: {captcha: null, email: '', subdomain: '', quantity: null, message: null, acceptNewsletter: false, earlyaccess: false}, acceptTerms: false, lowQuantityModalIsOpen: false, hubManaged: null, captchaState: null}" x-init="hubManaged = new HubManaged($refs.form, feedbackData, submitData)" class="container py-12">
5+
<section x-data="{steps: ['{{ i18n "hub_managed_step_1_nav_title" }}', '{{ i18n "hub_managed_step_2_nav_title" }}', '{{ i18n "hub_managed_step_3_nav_title" }}', '{{ i18n "hub_managed_step_4_nav_title" }}'], feedbackData: {currentStep: 0, success: false, inProgress: false, errorMessage: ''}, submitData: {captcha: null, email: '', subdomain: '', quantity: null, phone: null, message: null, acceptNewsletter: false, earlyaccess: false}, acceptTerms: false, lowQuantityModalIsOpen: false, hubManaged: null, captchaState: null}" x-init="hubManaged = new HubManaged($refs.form, feedbackData, submitData)" class="container py-12">
66
<header class="mb-6">
77
<h1 class="font-h1 mb-8">{{ .Title }}</h1>
88
<p class="lead">{{ i18n "hub_managed_description" }}</p>
@@ -164,6 +164,16 @@ <h2 class="font-h2 mb-6">
164164
</span>
165165
<span class="font-p text-sm" x-text="submitData.quantity"></span>
166166
</li>
167+
<li class="flex justify-between gap-2">
168+
<span class="font-p text-sm text-gray-500">
169+
{{ i18n "hub_managed_step_4_phone" }}
170+
</span>
171+
<a x-show="submitData.phone == null" href="#" class="font-p text-link text-sm" @click.prevent="submitData.phone = ''">
172+
<i class="fa-solid fa-plus-circle"></i>
173+
{{ i18n "hub_managed_step_4_phone_add" }}
174+
</a>
175+
<input x-show="submitData.phone != null" type="tel" id="phone" pattern="\+?[\d\s]{6,}" maxlength="30" class="input-box text-sm w-full max-w-xs" placeholder="{{ i18n "hub_managed_step_4_phone_placeholder" }}" x-model="submitData.phone" x-cloak>
176+
</li>
167177
<li class="flex justify-between gap-2">
168178
<span class="font-p text-sm text-gray-500">
169179
{{ i18n "hub_managed_step_4_message" }}

0 commit comments

Comments
 (0)