1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Add event listener for form submission

This commit is contained in:
Benjamin Beganović 2024-02-19 18:16:27 +01:00
parent 93df3a4007
commit 0f3cd7eb3c

View File

@ -4,3 +4,15 @@
@section('body')
@livewire('billing-portal.purchase', ['subscription' => $subscription, 'db' => $subscription->company->db, 'hash' => $hash, 'request_data' => $request_data, 'campaign' => request()->query('campaign') ?? null])
@stop
@push('footer')
<script>
document.addEventListener('livewire:init', () => {
Livewire.on('purchase.submit', () => {
setTimeout(() => {
document.getElementById('payment-method-form').submit()
}, 2000);
});
});
</script>
@endpush