|
2 | 2 | {{ partial "altcha-css.html" . }} |
3 | 3 | {{ end }} |
4 | 4 | {{ define "main" }} |
5 | | - <section x-data="{feedbackData: {success: false, inProgress: false, errorMessage: ''}, submitData: {firstName: '', lastName: '', email: '', phone: '', company: '', website: '', partnershipType: '', message: '', captcha: null, acceptNewsletter: false, formType: 'become-partner'}, acceptTerms: false, hubContact: null, captchaState: null}" x-init="hubContact = new HubContact($refs.form, feedbackData, submitData)" class="container py-12"> |
| 5 | + <section x-data="{feedbackData: {success: false, inProgress: false, errorMessage: ''}, submitData: {firstName: '', lastName: '', email: '', phone: '', company: '', website: '', partnershipType: '', message: '', captcha: null, acceptNewsletter: false, formType: 'become-partner'}, acceptTerms: false, apiForm: null, captchaState: null}" x-init="apiForm = new ApiForm($refs.form, feedbackData, submitData, API_BASE_URL + '/connect/contact/request-contact')" class="container py-12"> |
6 | 6 | <header class="mb-6"> |
7 | 7 | <h1 class="font-h1 mb-8">{{ .Title }}</h1> |
8 | 8 | <p class="lead">{{ .Description }}</p> |
9 | 9 | </header> |
10 | 10 |
|
11 | | - <form x-ref="form" @submit.prevent="hubContact.request(); $refs.captcha.reset()"> |
| 11 | + <form x-ref="form" @submit.prevent="apiForm.request(); $refs.captcha.reset()"> |
12 | 12 | <div x-show="!feedbackData.success" class="grid grid-cols-1 md:grid-cols-3 gap-6 items-start"> |
13 | 13 | <!-- Left Side - Partner Form --> |
14 | 14 | <section class="white-box md:col-span-2"> |
@@ -218,17 +218,17 @@ <h3 class="font-h3"> |
218 | 218 | {{ if hugo.IsDevelopment }} |
219 | 219 | {{ $newsletterJs := resources.Get "js/newsletter.js" }} |
220 | 220 | <script type="text/javascript" src="{{ $newsletterJs.RelPermalink }}" defer></script> |
221 | | - {{ $hubContactJs := resources.Get "js/hubcontact.js" }} |
222 | | - <script type="text/javascript" src="{{ $hubContactJs.RelPermalink }}" defer></script> |
| 221 | + {{ $apiFormJs := resources.Get "js/apiform.js" }} |
| 222 | + <script type="text/javascript" src="{{ $apiFormJs.RelPermalink }}" defer></script> |
223 | 223 | {{ $altchaJs := resources.Get "js/altcha/altcha.js" }} |
224 | 224 | <script type="module" src="{{ $altchaJs.RelPermalink }}" defer></script> |
225 | 225 | {{ $altchaWorkerJs := resources.Get "js/altcha/worker.js" }} |
226 | 226 | <script type="module" src="{{ $altchaWorkerJs.RelPermalink }}" defer></script> |
227 | 227 | {{ else }} |
228 | 228 | {{ $newsletterJs := resources.Get "js/newsletter.js" | minify | fingerprint }} |
229 | 229 | <script type="text/javascript" src="{{ $newsletterJs.RelPermalink }}" integrity="{{ $newsletterJs.Data.Integrity }}" defer></script> |
230 | | - {{ $hubContactJs := resources.Get "js/hubcontact.js" | minify | fingerprint }} |
231 | | - <script type="text/javascript" src="{{ $hubContactJs.RelPermalink }}" integrity="{{ $hubContactJs.Data.Integrity }}" defer></script> |
| 230 | + {{ $apiFormJs := resources.Get "js/apiform.js" | minify | fingerprint }} |
| 231 | + <script type="text/javascript" src="{{ $apiFormJs.RelPermalink }}" integrity="{{ $apiFormJs.Data.Integrity }}" defer></script> |
232 | 232 | {{ $altchaJs := resources.Get "js/altcha/altcha.js" }} |
233 | 233 | <script type="module" src="{{ $altchaJs.RelPermalink }}" integrity="{{ $altchaJs.Data.Integrity }}" defer></script> |
234 | 234 | {{ $altchaWorkerJs := resources.Get "js/altcha/worker.js" }} |
|
0 commit comments