Skip to content
Snippets Groups Projects
Commit 9b94e200 authored by Eileen McNaughton's avatar Eileen McNaughton
Browse files

don't prevent default unless stripe comes into play

parent 83816175
No related branches found
No related tags found
No related merge requests found
......@@ -50,9 +50,6 @@
// Intercept form submission.
$form.submit(function (event) {
event.preventDefault();
event.stopPropagation();
// Disable the submit button to prevent repeated clicks, cache button text, restore if Stripe returns error
buttonText = $submit.attr('value');
$submit.prop('disabled', true).attr('value', 'Processing');
......@@ -72,6 +69,8 @@
if ($form.find('input[name="payment_processor"]:checked').length && !parseInt($form.find('input[name="payment_processor"]:checked').val())) {
return true;
}
event.preventDefault();
event.stopPropagation();
// Handle changes introduced in CiviCRM 4.3.
if ($form.find('#credit_card_exp_date_M').length > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment