Inputs of type="number" need updating to adhere to ACC2 in additem.js
Created attachment 119450 [details] [review] Bug 28135: Replace use of input type number in additem.js This patch corrects in instance where JavaScript is creating an input tag with type "number." To test, apply the patch and make sure the AcqCreateItem system preference is set to "when receiving." - Go to Acquisitions -> Vendor -> Invoices -> Invoice -> Go to receipt page -> Receive. - On the page for receiving items you should see an add item form. - Click the "Add multiple items" button at the bottom of the form. - Test the "Number of items to add" field. It should not accept any input except numbers.
Hi Owen, The field accepts number with decimal (point or comma), even though only the number before separator is taken into account for the items creation. Is that expected ?
Created attachment 120434 [details] [review] Bug 28135: Replace use of input type number in additem.js This patch corrects in instance where JavaScript is creating an input tag with type "number." To test, apply the patch and make sure the AcqCreateItem system preference is set to "when receiving." - Go to Acquisitions -> Vendor -> Invoices -> Invoice -> Go to receipt page -> Receive. - On the page for receiving items you should see an add item form. - Click the "Add multiple items" button at the bottom of the form. - Test the "Number of items to add" field. It should not accept any input except numbers. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This one seems to work for me.. what browser were you using to test Severine?
(In reply to Martin Renvoize from comment #4) > This one seems to work for me.. what browser were you using to test Severine? I get a similar problem to Severine on Firefox - I ordered 13 copies, put 3.4 into the quantity to receive. When I typed 3 it selected three items, when I put '.4' it deselected all, but let me proceed. The quantity field in the order is correct at 10, but the quantity in the received order is 'NULL'
(In reply to Nick Clemens from comment #5) > (In reply to Martin Renvoize from comment #4) > > This one seems to work for me.. what browser were you using to test Severine? > > I get a similar problem to Severine on Firefox - I ordered 13 copies, put > 3.4 into the quantity to receive. > > When I typed 3 it selected three items, when I put '.4' it deselected all, > but let me proceed. The quantity field in the order is correct at 10, but > the quantity in the received order is 'NULL' Nick, was this comment for bug 28283? I am not able to recreate what you describe on FF 78.8 ESR
Created attachment 120761 [details] [review] Bug 28135: Replace use of input type number in additem.js This patch corrects in instance where JavaScript is creating an input tag with type "number." To test, apply the patch and make sure the AcqCreateItem system preference is set to "when receiving." - Go to Acquisitions -> Vendor -> Invoices -> Invoice -> Go to receipt page -> Receive. - On the page for receiving items you should see an add item form. - Click the "Add multiple items" button at the bottom of the form. - Test the "Number of items to add" field. It should not accept any input except numbers. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(In reply to Jonathan Druart from comment #6) > (In reply to Nick Clemens from comment #5) > > (In reply to Martin Renvoize from comment #4) > > > This one seems to work for me.. what browser were you using to test Severine? > > > > I get a similar problem to Severine on Firefox - I ordered 13 copies, put > > 3.4 into the quantity to receive. > > > > When I typed 3 it selected three items, when I put '.4' it deselected all, > > but let me proceed. The quantity field in the order is correct at 10, but > > the quantity in the received order is 'NULL' > > Nick, was this comment for bug 28283? > > I am not able to recreate what you describe on FF 78.8 ESR Yes, I tested the wrong thing. Note: There is no feedback when the input is incorrect - and I can still input strings as long as they start with a number, e.g. "4A" "5.2" but only the first numeric portion is used
Pushed to master for 21.05, thanks to everybody involved!
Not pushed to 20.11.x