From 089304cf199c5814cda3d3b893f6594076aa9217 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 22 Jul 2016 10:21:13 +1000 Subject: [PATCH] js revert --- booking.stripe.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/booking.stripe.js b/booking.stripe.js index d8d9c29..37e7daa 100644 --- a/booking.stripe.js +++ b/booking.stripe.js @@ -30,21 +30,21 @@ jQuery(document).ready(function($) { //var currentForm = undefined; $('.form-submit').click(function (e) { - //currentForm = $(this).closest('form'); - //if (currentForm === undefined) - // return; + currentForm = $(this).closest('form'); + if (currentForm === undefined) + return; var settings = Drupal.settings.booking_stripe; var $stripeForm = $("#" + settings.form_selector); alert($(':input[name="description"]', $stripeForm)); handler.open({ name: settings.name, - //description: currentForm.find('input[name="description"]').val(), - description: $(':input[name="description"]', $stripeForm), - //email: currentForm.find('input[name="email"]').val(), - email: $(':input[name="email"]', $stripeForm), + description: currentForm.find('input[name="description"]').val(), + //description: $(':input[name="description"]', $stripeForm), + email: currentForm.find('input[name="email"]').val(), + //email: $(':input[name="email"]', $stripeForm), currency: "aud", - //amount: currentForm.find('input[name="amount"]').val() * 100, - amount: $(':input[name="amount"]', $stripeForm), + amount: currentForm.find('input[name="amount"]').val() * 100, + //amount: $(':input[name="amount"]', $stripeForm), zipCode: true, closed: function() { //document.getElementById("booking_stripe_form").submit();