Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed use of hidden class on elements #288

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/templates/paymentForms/elementsForm.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
window.csrfTokenName = "{{ craft.app.config.general.csrfTokenName }}";
window.csrfTokenValue = "{{ craft.app.request.csrfToken }}";
</script>
<div class="stripe-payment-elements-form hidden"
<div class="stripe-payment-elements-form {{ hiddenClass }}"
data-publishablekey="{{ gateway.getPublishableKey() }}"
data-complete-payment-action-url="{{ actionUrl('commerce/payments/complete-payment') }}"
data-confirm-setup-intent-url="{{ actionUrl('commerce-stripe/customers/confirm-setup-intent') }}"
Expand All @@ -15,7 +15,7 @@
data-processing-button-text="{{ processingButtonText }}"
data-hidden-class="{{ hiddenClass }}"
>
<div class="hidden stripe-error-message {{ errorMessageClasses }}">
<div class="{{ hiddenClass }} stripe-error-message {{ errorMessageClasses }}">
{# Error messages are displayed to your customers, here. #}
</div>
<div class="stripe-payment-form">
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/elementsform/js/paymentForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class PaymentIntentsElements {
paymentElement.on('change', layoutChangeHandler);

// Show the container:
this.container.classList.remove('hidden');
this.container.classList.remove(this.hiddenClass);
}

async requiresActionFlow() {
Expand Down