From 44424b209cd73273796272ba4b32fe7280f912a5 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Mon, 4 Nov 2019 15:09:33 -0300 Subject: [PATCH] Bug 23868: Check if threshold is undefined in javascript block of opac-account.tt This patch fixes a bug introduced by checking payment plugins threshold To test: 1. do not apply this patch 2. configure paypal options in intranet 3. create a manual invoice for a patron 4. in opac try to pay that invoice CHECK => Make Payment button is disabled, even when invoices where checked. 5. apply this patch 6. repeat step 4 SUCCESS => Make Payment button is enabled when an invoice is checked. 7. Sign off Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt index 96cbfb390c..7375ca0ac1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt @@ -143,7 +143,7 @@ $( document ).ready(function() { return new Promise(function(resolve, reject) { var threshold = $(self).data('threshold'); var help = $(self).parent().siblings('.help-block'); - if(threshold == '' || threshold <= total) { + if(!threshold || threshold == '' || threshold <= total) { $(self).prop('disabled', false); help.addClass('hide'); } else { -- 2.39.5