From 468636bafa957b4b88e32952eabf9eb317f4289a Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 16 Mar 2018 10:12:57 +0200 Subject: [PATCH] Working on payment gateways --- resources/views/payments/credit_card.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/payments/credit_card.blade.php b/resources/views/payments/credit_card.blade.php index b0e9624c3b..c7f4a4f650 100644 --- a/resources/views/payments/credit_card.blade.php +++ b/resources/views/payments/credit_card.blade.php @@ -47,14 +47,14 @@ $(function() { $('.payment-form').submit(function(event) { - if (NINJA.formIsSubmitted) { + var $form = $(this); + + if ($form.find('button').is(':disabled')) { event.preventDefault(); return false; } - NINJA.formIsSubmitted = true; // Disable the submit button to prevent repeated clicks - var $form = $(this); $form.find('button').prop('disabled', true); return true;