Skip to content

Commit f6a09e4

Browse files
committed
Update payment method display structure and case-insensitive PayPal comparison
1 parent 6c079f2 commit f6a09e4

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

layouts/hub-billing/single.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,25 @@ <h1 class="font-h1">{{ .Title }}</h1>
135135
</dt>
136136
<dd>
137137
<template x-if="subscriptionData.details.payment_information">
138-
<div x-show="subscriptionData.details.payment_information.payment_method.toLowerCase() == 'card'">
139-
<p class="font-bold text-2xl md:text-3xl lg:text-4xl">
140-
{{ i18n "hub_billing_manage_payment_info_credit_card" . }}
141-
</p>
142-
<p class="text-xs text-gray-600 mt-1">
143-
{{ i18n "hub_billing_manage_payment_info_credit_card_last_four_digits_description" . }}: <span x-text="subscriptionData.details.payment_information.last_four_digits"></span>
138+
<div>
139+
<div x-show="subscriptionData.details.payment_information.payment_method.toLowerCase() == 'card'">
140+
<p class="font-bold text-2xl md:text-3xl lg:text-4xl">
141+
{{ i18n "hub_billing_manage_payment_info_credit_card" . }}
142+
</p>
143+
<p class="text-xs text-gray-600 mt-1">
144+
{{ i18n "hub_billing_manage_payment_info_credit_card_last_four_digits_description" . }}: <span x-text="subscriptionData.details.payment_information.last_four_digits"></span>
145+
</p>
146+
</div>
147+
<p x-show="subscriptionData.details.payment_information.payment_method.toLowerCase() == 'paypal'" class="font-bold text-2xl md:text-3xl lg:text-4xl">
148+
{{ i18n "hub_billing_manage_payment_info_paypal" . }}
144149
</p>
145150
</div>
146-
<p x-show="subscriptionData.details.payment_information.payment_method.toLowerCase() == 'paypal'" class="font-bold text-2xl md:text-3xl lg:text-4xl">
147-
{{ i18n "hub_billing_manage_payment_info_paypal" . }}
151+
</template>
152+
<template x-if="!subscriptionData.details.payment_information">
153+
<p class="font-bold text-2xl md:text-3xl lg:text-4xl">
154+
148155
</p>
149156
</template>
150-
<p x-show="!subscriptionData.details.payment_information" class="font-bold text-2xl md:text-3xl lg:text-4xl">
151-
152-
</p>
153157
<p class="mt-2">
154158
<button :disabled="subscriptionData.inProgress || subscriptionData.details.state == 'deleted'" @click.prevent="hubSubscription.updatePaymentMethod('{{ .Site.Language.Lang }}')" class="text-xs text-btn text-primary">
155159
<i class="fas fa-external-link fa-fw"></i>

0 commit comments

Comments
 (0)