Skip to content
Snippets Groups Projects
Commit 52ab0372 authored by Richard Burton's avatar Richard Burton
Browse files

simplify test for stripe processor

parent d1bf71d2
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,6 @@
$form.submit(function (event) {
if (isWebform) {
var $processorFields = $('.civicrm-enabled[name$="civicrm_1_contribution_1_contribution_payment_processor_id]"]');
var plabel = $('input[name$="civicrm_1_contribution_1_contribution_payment_processor_id]"]:checked').next().text();
if ($('#action').attr('value') == "< Previous Page") {
return true;
......@@ -98,7 +97,7 @@
if ($processorFields.filter(':checked').val() == '0') {
return true;
}
if (!(plabel.indexOf('stripe') >= 0)) {
if (!($form.find('input[name="stripe_token"]').length)) {
return true;
}
}
......
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