The current implementation of the price input fields allows users to enter an unlimited number of decimal places.
Summary of change
Added a restrictDecimalInput in price_form_controller.js. It won't allow a user to enter more than two decimal places in the price input fields. This method is designed to intercept key down events and prevent further input if the decimal part of the number already has two digits.
Testing approach
CHECK LIST
[x] СI passed
[x] Сode coverage >=95%
[x] PR is reviewed manually again (to make sure you have 100% ready code)
[x] All reviewers agreed to merge the PR
[x] I've checked new feature as logged in and logged out user if needed
Resolves: #817
Code reviewers
Summary of issue
The current implementation of the price input fields allows users to enter an unlimited number of decimal places.
Summary of change
Added a restrictDecimalInput in price_form_controller.js. It won't allow a user to enter more than two decimal places in the price input fields. This method is designed to intercept key down events and prevent further input if the decimal part of the number already has two digits.
Testing approach
CHECK LIST