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 <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
9a92554c6b
commit
1f32b62d1c
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue