Bug 27405

Summary: Update intranet-tmpl/prog/en/modules/pos/register.tt for ACC2
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Staff interfaceAssignee: Catherine <catherinem2003>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: catherinem2003, david, gmcharlt, jonathan.druart
Version: MainKeywords: Academy
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This patch updates occurrences of input type="number" in intranet-tmpl/prog/en/modules/pos/register.tt to use 'input type="text" inputmode="numeric" pattern="^\d+(\.\d{2})?$"' as per the accessibility coding guideline ACC2.
Version(s) released in:
21.05.00
Bug Depends on:    
Bug Blocks: 26926    
Attachments: Bug 27405: update file for ACC2
Bug 27405: update file for ACC2
Bug 27405: Update koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for ACC2
Bug 27405: (follow up) Updates to accommodate currency entry
Bug 27405: Update koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for ACC2
Bug 27405: (follow up) Updates to accommodate currency entry
Bug 27405: Update koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for ACC2
Bug 27405: (follow up) Updates to accommodate currency entry

Description Martin Renvoize 2021-01-12 10:17:59 UTC
We need to replace number type inputs in intranet-tmpl/prog/en/modules/pos/register.tt as per ACC2 guidelines.
Comment 1 Catherine 2021-01-20 01:02:14 UTC Comment hidden (obsolete)
Comment 2 Catherine 2021-01-20 21:40:47 UTC Comment hidden (obsolete)
Comment 3 David Nind 2021-02-20 23:07:37 UTC
Created attachment 117119 [details] [review]
Bug 27405: Update koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for ACC2

This replaces the number type input in
intranet-tmpl/prog/en/modules/pos/register.tt so that it is
consistent with ACC2 guidelines.

Test plan:
1. Enable the EnablePointOfSale (set to Enable) and UseCashRegisters
   (set to Use) system preferences.
2. Add a new cash register for a library (Home > Point of sale > Create
   a new cash register)
3. Add some sample items for sale (Home > Point of sale > Configure
   items for purchase)
4. Add some sales (Home > Point of sale > Add some items, enter a
   payment and sleect Confirm)
5. Issue a refund (Home > Point of sale > Register details > select
   Issue refund for an item)
6. Try to enter text, numbers with several decimal places, and , or
   multiple .
7. Apply the patch.
8. Repeat steps 4-6 - should continue to function as expected, with
   appropriate warning messages for invalid entries.
9. Search koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for
   input type="number" - there should be no occurences.
10. Sign off!

Sponsored by Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2021-02-20 23:07:40 UTC
Created attachment 117120 [details] [review]
Bug 27405: (follow up) Updates to accommodate currency entry

This patch makes two modifications to allow the entry of
currency strings (for example, 1.25) so that it is consistent with other
payment entry forms.

- 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>
Comment 5 David Nind 2021-02-20 23:10:03 UTC
Comment on attachment 115463 [details] [review]
Bug 27405: update file for ACC2

I've:
- Added steps to the test plan so you can test register.tt
- Updated the title in the commit message so that it matches guidelines (Bug XXXX:   
  Commit title).
- Added a follow up to match other similar bugs - Bug 27408 and 
  Bug 27410.

Have left as requiring sign off.
Comment 6 Owen Leonard 2021-02-23 11:51:15 UTC
Created attachment 117195 [details] [review]
Bug 27405: Update koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for ACC2

This replaces the number type input in
intranet-tmpl/prog/en/modules/pos/register.tt so that it is
consistent with ACC2 guidelines.

Test plan:
1. Enable the EnablePointOfSale (set to Enable) and UseCashRegisters
   (set to Use) system preferences.
2. Add a new cash register for a library (Home > Point of sale > Create
   a new cash register)
3. Add some sample items for sale (Home > Point of sale > Configure
   items for purchase)
4. Add some sales (Home > Point of sale > Add some items, enter a
   payment and sleect Confirm)
5. Issue a refund (Home > Point of sale > Register details > select
   Issue refund for an item)
6. Try to enter text, numbers with several decimal places, and , or
   multiple .
7. Apply the patch.
8. Repeat steps 4-6 - should continue to function as expected, with
   appropriate warning messages for invalid entries.
9. Search koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for
   input type="number" - there should be no occurences.
10. Sign off!

Sponsored by Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Owen Leonard 2021-02-23 11:51:17 UTC
Created attachment 117196 [details] [review]
Bug 27405: (follow up) Updates to accommodate currency entry

This patch makes two modifications to allow the entry of
currency strings (for example, 1.25) so that it is consistent with other
payment entry forms.

- 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: Owen Leonard <oleonard@myacpl.org>
Comment 8 Katrin Fischer 2021-03-04 15:57:53 UTC
Created attachment 117740 [details] [review]
Bug 27405: Update koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for ACC2

This replaces the number type input in
intranet-tmpl/prog/en/modules/pos/register.tt so that it is
consistent with ACC2 guidelines.

Test plan:
1. Enable the EnablePointOfSale (set to Enable) and UseCashRegisters
   (set to Use) system preferences.
2. Add a new cash register for a library (Home > Point of sale > Create
   a new cash register)
3. Add some sample items for sale (Home > Point of sale > Configure
   items for purchase)
4. Add some sales (Home > Point of sale > Add some items, enter a
   payment and sleect Confirm)
5. Issue a refund (Home > Point of sale > Register details > select
   Issue refund for an item)
6. Try to enter text, numbers with several decimal places, and , or
   multiple .
7. Apply the patch.
8. Repeat steps 4-6 - should continue to function as expected, with
   appropriate warning messages for invalid entries.
9. Search koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for
   input type="number" - there should be no occurences.
10. Sign off!

Sponsored by Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2021-03-04 15:57:56 UTC
Created attachment 117741 [details] [review]
Bug 27405: (follow up) Updates to accommodate currency entry

This patch makes two modifications to allow the entry of
currency strings (for example, 1.25) so that it is consistent with other
payment entry forms.

- Inputmode changed to "decimal"
- Regex pattern changed to "^\d+(\.\d{2})?$" as found in
  admin/debit_types.tt

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2021-03-09 16:19:53 UTC
Pushed to master for 21.05, thanks to everybody involved!