Skip to content
Snippets Groups Projects
Unverified Commit a62264e8 authored by mattwire's avatar mattwire Committed by GitHub
Browse files

Merge pull request #5 from progressivetech/support-html5-newer-jquery

Ensure newer versions of jquery handle total amount properly
parents d1b8c426 02d8505f
No related branches found
No related tags found
No related merge requests found
......@@ -180,7 +180,10 @@
$totalElement = $('#wf-crm-billing-total');
if ($totalElement.length) {
if ($totalElement.data('data-amount') === '0') {
// Handle old and new jQuery conventions (https://api.jquery.com/data/#data-html5)
// The second form is the new form as of jQuery 1.4.3 (jQuery tries to convert string
// numbers to integers).
if ($totalElement.data('data-amount') === '0' || $totalElement.data('amount') === 0 ) {
debugging('webform total is 0');
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