Commit c04aefe2 authored by varshith's avatar varshith

Support Drupal 8 Webform Markup To Process Payments

parent 6f21209b
......@@ -344,8 +344,8 @@ CRM.$(function($) {
function getIsWebform(form) {
// Pass in the billingForm object
// If the form has the webform-client-form class then it's a drupal webform!
return form.hasClass('webform-client-form');
// If the form has the webform-client-form (drupal 7) or webform-submission-form (drupal 8) class then it's a drupal webform!
return form.hasClass('webform-client-form') || form.hasClass('webform-submission-form');
}
function getBillingForm() {
......@@ -368,6 +368,10 @@ CRM.$(function($) {
if (isWebform) {
$submit = $form.find('[type="submit"].webform-submit');
if (!$submit.length) {
// drupal 8 webform
$submit = $form.find('[type="submit"].webform-button--submit');
}
}
else {
$submit = $form.find('[type="submit"].validate');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment