33{{ end }}
44{{ define "main" }}
55 < div class ="container pt-12 pb-24 ">
6- < form x-data ="{subscriptionData: {state: 'MISSING_PARAMS', captcha: null, hubId: null, returnUrl: null, session: null, hubToken : null, customBilling: null, billingInterval: 'yearly', savingsPercent: null, errorMessage: '', inProgress: false, restartModal: {open: false, nextPayment: null}, changeSeatsModal: {open: false, confirmation: false, immediatePayment: null}, token: null, details: null, quantity: 5, email: '', needsTokenRefresh: false, shouldTransferToHub: false}, 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(); $refs.captcha.reset() ">
6+ < form x-data ="{subscriptionData: {state: 'MISSING_PARAMS', captcha: null, hubId: null, returnUrl: null, session: null, oldLicense : null, customBilling: null, billingInterval: 'yearly', savingsPercent: null, errorMessage: '', inProgress: false, restartModal: {open: false, nextPayment: null}, changeSeatsModal: {open: false, confirmation: false, immediatePayment: null}, token: null, details: null, quantity: 5, email: '', needsTokenRefresh: false, shouldTransferToHub: false}, 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(); $refs.captcha.reset() ">
77 < template x-if ="subscriptionData.state == 'MISSING_PARAMS' ">
88 < div class ="text-center max-w-xl mx-auto ">
99 < h3 class ="font-headline text-xl md:text-2xl leading-relaxed mb-4 ">
@@ -314,8 +314,8 @@ <h3 class="font-headline text-xl md:text-2xl leading-relaxed mb-4" id="change-se
314314 < h1 class ="font-h1 mb-8 "> {{ .Title }}</ h1 >
315315 < p class ="lead "> {{ i18n "hub_billing_checkout_description" . }}</ p >
316316 </ header >
317- < div class ="grid grid-cols-1 gap-4 mb-12 " :class ="subscriptionData.hubToken && !subscriptionData.customBilling?.managed ? 'md:grid-cols-3' : 'md:grid-cols-2' ">
318- < div x-show ="subscriptionData.hubToken && !subscriptionData.customBilling?.managed " class ="hidden md:block "> </ div >
317+ < div class ="grid grid-cols-1 gap-4 mb-12 " :class ="subscriptionData.oldLicense && !subscriptionData.customBilling?.managed ? 'md:grid-cols-3' : 'md:grid-cols-2' ">
318+ < div x-show ="subscriptionData.oldLicense && !subscriptionData.customBilling?.managed " class ="hidden md:block "> </ div >
319319 < div class ="flex justify-center ">
320320 < button class ="w-1/2 py-2 border border-gray-300 rounded-l bg-gray-300 text-gray-700 hover:border-gray-400 hover:bg-gray-400 focus:bg-gray-400 focus:border-secondary " :class ="{'border-gray-400 bg-gray-400 text-gray-800 font-medium': audience === 'business'} " @click.prevent ="audience = 'business' ">
321321 < i class ="fa-building " :class ="{'fas': audience === 'business', 'far': audience !== 'business'} "> </ i >
@@ -327,7 +327,7 @@ <h1 class="font-h1 mb-8">{{ .Title }}</h1>
327327 </ button >
328328 </ div >
329329 < div class ="hidden md:block "> </ div >
330- < div x-show ="subscriptionData.hubToken && !subscriptionData.customBilling?.managed " class ="flex flex-col white-box ">
330+ < div x-show ="subscriptionData.oldLicense && !subscriptionData.customBilling?.managed " class ="flex flex-col white-box ">
331331 < div class ="p-4 border-b border-primary ">
332332 < h2 class ="inline-flex px-4 py-1 rounded-full text-sm font-medium tracking-wide uppercase bg-primary-l2 text-dark mb-4 ">
333333 {{ i18n "hub_billing_checkout_community_title" . }}
@@ -354,7 +354,7 @@ <h3 class="font-h3 mb-4 md:mb-0">
354354 {{ i18n "hub_billing_checkout_community_cta" . }}
355355 </ p >
356356 </ div >
357- < a :href ="`{{ "hub /register" | relLangURL }}#oldLicense=${encodeURIComponent(subscriptionData.hubToken )}&returnUrl =${encodeURIComponent(subscriptionData.returnUrl)}`" role="button" class="btn btn-primary w-full">
357+ < a :href ="`{{ "hub /register" | relLangURL }}#oldLicense=${encodeURIComponent(subscriptionData.oldLicense )}&returnUrl =${encodeURIComponent(subscriptionData.returnUrl)}`" role="button" class="btn btn-primary w-full">
358358 < i class ="fa-solid fa-user-plus "> </ i >
359359 {{ i18n "hub_billing_checkout_community_action" . }}
360360 </ a >
@@ -442,7 +442,7 @@ <h2 class="inline-flex px-4 py-1 rounded-full text-sm font-medium tracking-wide
442442 </ p >
443443 < 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 >
444444 < 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 >
445- < button :disabled ="subscriptionData.inProgress || !acceptTerms " @click.prevent ="hubSubscription.checkout('{{ .Site.Language.Lang }}') " type ="button " class ="btn btn-primary w-full " :class ="!(subscriptionData.hubToken && !subscriptionData.customBilling?.managed) && 'lg:w-1/2' ">
445+ < button :disabled ="subscriptionData.inProgress || !acceptTerms " @click.prevent ="hubSubscription.checkout('{{ .Site.Language.Lang }}') " type ="button " class ="btn btn-primary w-full " :class ="!(subscriptionData.oldLicense && !subscriptionData.customBilling?.managed) && 'lg:w-1/2' ">
446446 < i :class ="{'fa-shopping-cart': !subscriptionData.inProgress, 'fa-check': !subscriptionData.inProgress, 'fa-spinner fa-spin': subscriptionData.inProgress} " class ="fa-solid " aria-hidden ="true "> </ i >
447447 {{ i18n "hub_billing_checkout_standard_submit" . }}
448448 </ button >
@@ -477,7 +477,7 @@ <h3 class="font-h3 mb-4 md:mb-0">
477477 {{ i18n "hub_billing_checkout_enterprise_cta" . }}
478478 </ p >
479479 </ div >
480- < a href ="mailto:hub@cryptomator.org " role ="button " class ="btn btn-primary w-full " :class ="!(subscriptionData.hubToken && !subscriptionData.customBilling?.managed) && 'lg:w-1/2' ">
480+ < a href ="mailto:hub@cryptomator.org " role ="button " class ="btn btn-primary w-full " :class ="!(subscriptionData.oldLicense && !subscriptionData.customBilling?.managed) && 'lg:w-1/2' ">
481481 < i class ="fa-solid fa-envelope "> </ i >
482482 {{ i18n "hub_billing_checkout_enterprise_action" . }}
483483 </ a >
0 commit comments