Bug 27967: Add min attribute to borraccount modals
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 16 Mar 2021 16:39:13 +0000 (16:39 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 18 Mar 2021 14:03:29 +0000 (15:03 +0100)
commita6d77fb4286c3be6fe513a95bc258b7b3fb45c03
tree9825e965102d928acb86c2965b837fec0c1fcdae
parent1b32e66380d5d7701b3f252e8d2be1cbf1622388
Bug 27967: Add min attribute to borraccount modals

This patch adds a min attribute to the form fields of the borrower
account page modals to prevent negative values being entered
inappropriately.

Test plan
1/ Trigger the refund modal from the borrower account page.
2/ Attempt to enter a negative value for the amount to refund and note
with the patch applied you face a validation error (without the patch,
upon submission of a negative value you will be faced with a server side
error)
3/ Trigger the discount modal from the borrower account page.
4/ Attempt to enter a negative value for the amount to discount and note
with the patch applied you face a validation error (without the patch,
upon submission of a negative value you will be faced with a server side
error)
5/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt