Skip to content
Snippets Groups Projects
Commit 658743a0 authored by mattwire's avatar mattwire
Browse files

Add event crmStripeBillingFormReloadComplete

parent c297b0dc
Branches
Tags
1 merge request!1246.5
......@@ -22,6 +22,9 @@ Example code:
This event is triggered when the form has completed reloading and is ready for use (Stripe element visible etc.).
It is useful for clearing any "loading" indicators and unfreezing form elements.
### crmStripeBillingFormReloadComplete
This event is triggered when the form has completed reloading, is ready for use and the selected payment processor is Stripe.
### crmBillingFormReloadFailed
This event is triggered when the form fails to complete reloading and is NOT ready for use. It usually happens if there
is a problem (such as a network issue) when loading the Stripe elements.
......
......@@ -289,6 +289,7 @@
debugging("Script loaded and executed.");
loadStripeBillingBlock();
triggerEvent('crmBillingFormReloadComplete');
triggerEvent('crmStripeBillingFormReloadComplete');
})
.fail(function() {
stripeLoading = false;
......@@ -299,7 +300,7 @@
else {
loadStripeBillingBlock();
if (checkPaymentElementsAreValid()) {
triggerEvent('crmBillingFormReloadComplete');
triggerEvent('crmStripeBillingFormReloadComplete');
}
else {
debugging('Failed to load payment elements');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment