From 411c1fdb4bbad7b09091492d356f720cb4e70817 Mon Sep 17 00:00:00 2001 From: mathmerized Date: Thu, 27 Sep 2018 13:34:45 -0400 Subject: [PATCH] Bump version and fix js error to add validation only if field exists --- app/views/assets/_accounting_asset_form.html.haml | 9 ++++++--- lib/transam_accounting/version.rb | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/assets/_accounting_asset_form.html.haml b/app/views/assets/_accounting_asset_form.html.haml index 2fb359ca..ca4ca6bf 100644 --- a/app/views/assets/_accounting_asset_form.html.haml +++ b/app/views/assets/_accounting_asset_form.html.haml @@ -28,9 +28,12 @@ form.submit(); } }); - $('input.funding-pcnt').rules( "add", { - pcntSumsHundred: true - }); + if ($('input.funding-pcnt').length > 0) { + $('input.funding-pcnt').rules( "add", { + pcntSumsHundred: true + }); + } + }); $('body').on('change', '#grant_purchases .funding-pcnt', function() { diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index 84ab0b6a..72b823eb 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "2.3.5" + VERSION = "2.3.6" end