From 1f32b62d1c3be39459eabd7898b2d9aa0dbe7d9e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 16 Mar 2021 16:06:36 +0000 Subject: [PATCH] Bug 24300: (follow-up) Set minimum for amount input Add a 'min' attribute for validation of the amount field in the payout modal so that negative amounts cannot be submitted. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index 7b0f34fd80..6b7fe391e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -365,7 +365,7 @@ $('#payoutline').val(accountline); var amount = button.data('amount') * -1; $("#paid + span").replaceWith(amount); - $("#amount").attr({ "value": amount, "max": amount }); + $("#amount").attr({ "value": amount, "max": amount, "min": 0 }); $("#amount, #payout_transaction_type").focus(); }); -- 2.39.5