Inputs of type="number" need updating to adhere to ACC2 in intranet-tmpl/prog/en/modules/members/maninvoice.tt
Created attachment 115394 [details] [review] Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 Test Plan: 1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt 2. Search for instances of 'input type="number"' 3. If none are found then patch was successful
There is more to do when converting a "type='number'" input: If present, the "step," "max," and "min" attributes should be removed too. They are invalid if applied to a standard text input. Example errors from the w3c validator: Error: Attribute step not allowed on element input at this point. Error: Attribute min not allowed on element input at this point.
Created attachment 115471 [details] [review] Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 Test Plan: 1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt 2. Search for instances of 'input type="number"' 3. If none are found then patch was successful
I didn't predict this when I was testing before: The regex validating the modified field doesn't allow for currency-formatted values like "1.00" because of the dot.
Created attachment 115551 [details] [review] Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 Test Plan: 1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt 2. Search for instances of 'input type="number"' 3. If none are found then patch was successful Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 115553 [details] [review] Bug 27410: (follow-up) Updates to accommodate currency entry This patch makes two modifications in order to allow the entry of currency strings (e.g. 1.25). - Inputmode changed to "decimal" - Regex pattern changed to "^\d+(\.\d{2})?$" as found in admin/debit_types.tt To test, apply the patch and test entry of various strings in the manual invoice "amount" field. Confirm that the field only accepts digits or digits followed by a decimal and two digits.
Created attachment 117012 [details] [review] Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 Test Plan: 1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt 2. Search for instances of 'input type="number"' 3. If none are found then patch was successful Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 117013 [details] [review] Bug 27410: (follow-up) Updates to accommodate currency entry This patch makes two modifications in order to allow the entry of currency strings (e.g. 1.25). - Inputmode changed to "decimal" - Regex pattern changed to "^\d+(\.\d{2})?$" as found in admin/debit_types.tt To test, apply the patch and test entry of various strings in the manual invoice "amount" field. Confirm that the field only accepts digits or digits followed by a decimal and two digits. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 117700 [details] [review] Bug 27410: (follow-up) Updates to accommodate currency entry This patch makes two modifications in order to allow the entry of currency strings (e.g. 1.25). - Inputmode changed to "decimal" - Regex pattern changed to "^\d+(\.\d{2})?$" as found in admin/debit_types.tt To test, apply the patch and test entry of various strings in the manual invoice "amount" field. Confirm that the field only accepts digits or digits followed by a decimal and two digits. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I am personally very happy about these changes because we had to maintain them as local changes for a long time :)
Created attachment 117705 [details] [review] Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 Test Plan: 1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt 2. Search for instances of 'input type="number"' 3. If none are found then patch was successful Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 117706 [details] [review] Bug 27410: (follow-up) Updates to accommodate currency entry This patch makes two modifications in order to allow the entry of currency strings (e.g. 1.25). - Inputmode changed to "decimal" - Regex pattern changed to "^\d+(\.\d{2})?$" as found in admin/debit_types.tt To test, apply the patch and test entry of various strings in the manual invoice "amount" field. Confirm that the field only accepts digits or digits followed by a decimal and two digits. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 21.05, thanks to everybody involved!
I've dediced not pushed to 20.11.x changes for ACC2
(In reply to Fridolin Somers from comment #14) > I've dediced not pushed to 20.11.x changes for ACC2 Why not? These are very atomic and accessibility fixes are really more bug fixes than enhancements.
(In reply to Katrin Fischer from comment #15) > (In reply to Fridolin Somers from comment #14) > > I've dediced not pushed to 20.11.x changes for ACC2 > > Why not? These are very atomic and accessibility fixes are really more bug > fixes than enhancements. Ah OK. I'll try to find time to pick them.
Patch 117706 "Bug 27410: (follow-up) Updates to accommodate currency entry" doesn't take into consideration regional settings: inputmode="decimal" pattern="^\d+(\.\d{2})?$" this never will let comma-separated values to pass (in Finland, for example, coma is used as separator), i.e. "0,00" won't pass. Also there is another requirement from librarians - to have field completely empty if it's 0, so they could just paste amount (as they usually do) without the need to clear the field first. And anyway if you save the form with 0.00 value, it won't accept it saying "Debit amount passed is not positive" so in my opinion there's no point to preset it with zeroes to begin with.
Let's continue discussion in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28168